﻿///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Dec 17 2007)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////

#ifdef WX_PRECOMP

#include "wx/wxprec.h"

#ifdef __BORLANDC__
#pragma hdrstop
#endif //__BORLANDC__

#else
#include <wx/wx.h>
#endif //WX_PRECOMP

#include "Gangia_GUI.h"

///////////////////////////////////////////////////////////////////////////

PlotFrame::PlotFrame( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxSize( 400,300 ), wxDefaultSize );
	
	BigSizer = new wxBoxSizer( wxVERTICAL );
	
	ControlPanel = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxNO_BORDER|wxTAB_TRAVERSAL );
	wxBoxSizer* ChoiceSizer;
	ChoiceSizer = new wxBoxSizer( wxHORIZONTAL );
	
	PlotControlsOpened = new wxBitmapButton( ControlPanel, wxID_Hide, wxBitmap( wxT("Media/plot buttons/Controls_Opened_plot.bmp"), wxBITMAP_TYPE_ANY ), wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|wxNO_BORDER );
	
	PlotControlsOpened->SetBitmapSelected( wxBitmap( wxT("Media/plot buttons/Controls_Opened_plot_press.bmp"), wxBITMAP_TYPE_ANY ) );
	ChoiceSizer->Add( PlotControlsOpened, 0, wxBOTTOM|wxLEFT|wxTOP, 5 );
	
	plot_control_panel = new wxPanel( ControlPanel, wxID_ANY, wxDefaultPosition, wxSize( -1,100 ), wxTAB_TRAVERSAL );
	plot_control_panel->SetBackgroundColour( wxColour( 211, 211, 211 ) );
	
	wxBoxSizer* bSizer72;
	bSizer72 = new wxBoxSizer( wxHORIZONTAL );
	
	
	bSizer72->Add( 7, 0, 0, wxEXPAND, 5 );
	
	m_PlayButton = new wxBitmapButton( plot_control_panel, wxID_PLAY, wxBitmap( wxT("Media/plot buttons/play.bmp"), wxBITMAP_TYPE_ANY ), wxDefaultPosition, wxSize( 36,36 ), wxBU_AUTODRAW );
	
	m_PlayButton->SetBitmapDisabled( wxBitmap( wxT("Media/plot buttons/play inactive.bmp"), wxBITMAP_TYPE_ANY ) );
	m_PlayButton->SetBitmapSelected( wxBitmap( wxT("Media/plot buttons/play pressed.bmp"), wxBITMAP_TYPE_ANY ) );
	m_PlayButton->SetToolTip( wxT("Restart visualization") );
	
	m_PlayButton->SetToolTip( wxT("Restart visualization") );
	
	bSizer72->Add( m_PlayButton, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 2 );
	
	m_FreezeButton = new wxBitmapButton( plot_control_panel, wxID_FREEZE, wxBitmap( wxT("Media/plot buttons/stop.bmp"), wxBITMAP_TYPE_ANY ), wxDefaultPosition, wxSize( 36,36 ), wxBU_AUTODRAW );
	
	m_FreezeButton->SetBitmapDisabled( wxBitmap( wxT("Media/plot buttons/stop inactive.bmp"), wxBITMAP_TYPE_ANY ) );
	m_FreezeButton->SetBitmapSelected( wxBitmap( wxT("Media/plot buttons/stop pressed.bmp"), wxBITMAP_TYPE_ANY ) );
	m_FreezeButton->SetToolTip( wxT("Pauses the visualization without stopping the acquisition") );
	
	m_FreezeButton->SetToolTip( wxT("Pauses the visualization without stopping the acquisition") );
	
	bSizer72->Add( m_FreezeButton, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 2 );
	
	ZoomIn = new wxBitmapButton( plot_control_panel, wxID_ZOOMIN, wxBitmap( wxT("Media/plot buttons/zoomin.bmp"), wxBITMAP_TYPE_ANY ), wxDefaultPosition, wxSize( 36,36 ), wxBU_AUTODRAW );
	
	ZoomIn->SetBitmapSelected( wxBitmap( wxT("Media/plot buttons/zoomin_Pressed.bmp"), wxBITMAP_TYPE_ANY ) );
	ZoomIn->SetToolTip( wxT("Zoom + along the x/time axis") );
	
	ZoomIn->SetToolTip( wxT("Zoom + along the x/time axis") );
	
	bSizer72->Add( ZoomIn, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 2 );
	
	ZoomOut = new wxBitmapButton( plot_control_panel, wxID_ZOOMOUT, wxBitmap( wxT("Media/plot buttons/zoomout.bmp"), wxBITMAP_TYPE_ANY ), wxDefaultPosition, wxSize( 36,36 ), wxBU_AUTODRAW );
	
	ZoomOut->SetBitmapSelected( wxBitmap( wxT("Media/plot buttons/zoomOut_Pressed.bmp"), wxBITMAP_TYPE_ANY ) );
	ZoomOut->SetToolTip( wxT("Zoom - along the x/time axis") );
	
	ZoomOut->SetToolTip( wxT("Zoom - along the x/time axis") );
	
	bSizer72->Add( ZoomOut, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 2 );
	
	Scope = new wxBitmapButton( plot_control_panel, wxID_SCOPE, wxBitmap( wxT("Media/plot buttons/valueoff.bmp"), wxBITMAP_TYPE_ANY ), wxDefaultPosition, wxSize( 36,36 ), wxBU_AUTODRAW );
	
	Scope->SetBitmapDisabled( wxBitmap( wxT("Media/plot buttons/valueoff.bmp"), wxBITMAP_TYPE_ANY ) );
	Scope->SetBitmapSelected( wxBitmap( wxT("Media/plot buttons/valueon.bmp"), wxBITMAP_TYPE_ANY ) );
	Scope->SetToolTip( wxT("Activate Scope") );
	
	Scope->SetToolTip( wxT("Activate Scope") );
	
	bSizer72->Add( Scope, 0, wxALIGN_CENTER|wxBOTTOM|wxLEFT|wxRIGHT, 2 );
	
	DisScope = new wxBitmapButton( plot_control_panel, wxID_DISSCOPE, wxBitmap( wxT("Media/plot buttons/valueon.bmp"), wxBITMAP_TYPE_ANY ), wxDefaultPosition, wxSize( 36,36 ), wxBU_AUTODRAW );
	
	DisScope->SetBitmapDisabled( wxBitmap( wxT("Media/plot buttons/valueoff.bmp"), wxBITMAP_TYPE_ANY ) );
	DisScope->SetBitmapSelected( wxBitmap( wxT("Media/plot buttons/valueoff.bmp"), wxBITMAP_TYPE_ANY ) );
	DisScope->Hide();
	DisScope->SetToolTip( wxT("Disable Scope") );
	
	DisScope->Hide();
	DisScope->SetToolTip( wxT("Disable Scope") );
	
	bSizer72->Add( DisScope, 0, wxALIGN_CENTER|wxBOTTOM|wxLEFT|wxRIGHT, 2 );
	
	m_staticline5 = new wxStaticLine( plot_control_panel, wxID_ANY, wxDefaultPosition, wxSize( 1,-1 ), wxLI_HORIZONTAL );
	bSizer72->Add( m_staticline5, 0, wxEXPAND | wxALL, 5 );
	
	wxBoxSizer* bSizer74;
	bSizer74 = new wxBoxSizer( wxVERTICAL );
	
	m_staticText117 = new wxStaticText( plot_control_panel, wxID_ANY, wxT("Spatial Filter:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText117->Wrap( -1 );
	m_staticText117->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Calibri") ) );
	
	bSizer74->Add( m_staticText117, 0, wxBOTTOM|wxLEFT|wxTOP, 5 );
	
	wxString m_LeadChoices[] = { wxT("Single Ended"), wxT("CAR") };
	int m_LeadNChoices = sizeof( m_LeadChoices ) / sizeof( wxString );
	m_Lead = new wxChoice( plot_control_panel, wxID_CHOICE_LEAD, wxDefaultPosition, wxDefaultSize, m_LeadNChoices, m_LeadChoices, 0 );
	m_Lead->SetSelection( 0 );
	m_Lead->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Calibri") ) );
	m_Lead->SetToolTip( wxT("Select a spatial visualization filter") );
	m_Lead->SetMinSize( wxSize( 80,-1 ) );
	
	bSizer74->Add( m_Lead, 0, wxLEFT, 5 );
	
	bSizer72->Add( bSizer74, 0, wxRIGHT, 10 );
	
	wxBoxSizer* bSizer75;
	bSizer75 = new wxBoxSizer( wxVERTICAL );
	
	m_staticText118 = new wxStaticText( plot_control_panel, wxID_ANY, wxT("Signal Filter:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText118->Wrap( -1 );
	m_staticText118->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Calibri") ) );
	
	bSizer75->Add( m_staticText118, 0, wxLEFT|wxTOP, 5 );
	
	wxString m_ProcessingChoices[] = { wxT("None") };
	int m_ProcessingNChoices = sizeof( m_ProcessingChoices ) / sizeof( wxString );
	m_Processing = new wxChoice( plot_control_panel, wxID_CHOICE_FILTER, wxDefaultPosition, wxSize( 80,-1 ), m_ProcessingNChoices, m_ProcessingChoices, 0 );
	m_Processing->SetSelection( 0 );
	m_Processing->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Calibri") ) );
	m_Processing->SetToolTip( wxT("Select a time-domain visualization filter") );
	
	bSizer75->Add( m_Processing, 0, wxRIGHT|wxTOP, 5 );
	
	bSizer72->Add( bSizer75, 0, wxLEFT, 10 );
	
	m_staticline6 = new wxStaticLine( plot_control_panel, wxID_ANY, wxDefaultPosition, wxSize( 1,-1 ), wxLI_HORIZONTAL );
	bSizer72->Add( m_staticline6, 0, wxEXPAND | wxALL, 5 );
	
	wxBoxSizer* bSizer76;
	bSizer76 = new wxBoxSizer( wxVERTICAL );
	
	m_staticText119 = new wxStaticText( plot_control_panel, wxID_ANY, wxT("Triggers:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText119->Wrap( -1 );
	m_staticText119->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Calibri") ) );
	
	bSizer76->Add( m_staticText119, 0, wxLEFT|wxTOP, 5 );
	
	wxBoxSizer* bSizer77;
	bSizer77 = new wxBoxSizer( wxHORIZONTAL );
	
	m_Trigger0 = new wxBitmapButton( plot_control_panel, wxID_TRIG0, wxBitmap( wxT("Media/plot buttons/trigger1.bmp"), wxBITMAP_TYPE_ANY ), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW );
	m_Trigger0->SetToolTip( wxT("Trigger 1") );
	
	m_Trigger0->SetToolTip( wxT("Trigger 1") );
	
	bSizer77->Add( m_Trigger0, 0, wxTOP, 3 );
	
	m_Trigger1 = new wxBitmapButton( plot_control_panel, wxID_TRIG1, wxBitmap( wxT("Media/plot buttons/trigger2.bmp"), wxBITMAP_TYPE_ANY ), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW );
	m_Trigger1->SetToolTip( wxT("Trigger 2") );
	
	m_Trigger1->SetToolTip( wxT("Trigger 2") );
	
	bSizer77->Add( m_Trigger1, 0, wxTOP, 3 );
	
	m_Trigger2 = new wxBitmapButton( plot_control_panel, wxID_TRIG2, wxBitmap( wxT("Media/plot buttons/trigger3.bmp"), wxBITMAP_TYPE_ANY ), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW );
	m_Trigger2->SetToolTip( wxT("Trigger 3") );
	
	m_Trigger2->SetToolTip( wxT("Trigger 3") );
	
	bSizer77->Add( m_Trigger2, 0, wxTOP, 3 );
	
	m_Trigger3 = new wxBitmapButton( plot_control_panel, wxID_TRIG3, wxBitmap( wxT("Media/plot buttons/trigger4.bmp"), wxBITMAP_TYPE_ANY ), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW );
	m_Trigger3->SetToolTip( wxT("Trigger 4") );
	
	m_Trigger3->SetToolTip( wxT("Trigger 4") );
	
	bSizer77->Add( m_Trigger3, 0, wxTOP, 3 );
	
	m_Trigger4 = new wxBitmapButton( plot_control_panel, wxID_TRIG4, wxBitmap( wxT("Media/plot buttons/trigger5.bmp"), wxBITMAP_TYPE_ANY ), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW );
	m_Trigger4->SetToolTip( wxT("Trigger 5") );
	
	m_Trigger4->SetToolTip( wxT("Trigger 5") );
	
	bSizer77->Add( m_Trigger4, 0, wxTOP, 3 );
	
	m_Trigger5 = new wxBitmapButton( plot_control_panel, wxID_TRIG5, wxBitmap( wxT("Media/plot buttons/trigger6.bmp"), wxBITMAP_TYPE_ANY ), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW );
	m_Trigger5->SetToolTip( wxT("6") );
	
	m_Trigger5->SetToolTip( wxT("6") );
	
	bSizer77->Add( m_Trigger5, 0, wxTOP, 3 );
	
	bSizer76->Add( bSizer77, 0, 0, 5 );
	
	bSizer72->Add( bSizer76, 0, 0, 5 );
	
	m_staticline9 = new wxStaticLine( plot_control_panel, wxID_ANY, wxDefaultPosition, wxSize( 1,-1 ), 0 );
	bSizer72->Add( m_staticline9, 0, wxEXPAND | wxALL, 5 );
	
	wxBoxSizer* bSizer691;
	bSizer691 = new wxBoxSizer( wxVERTICAL );
	
	m_staticText1161 = new wxStaticText( plot_control_panel, wxID_ANY, wxT("Graphs/Page:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText1161->Wrap( -1 );
	m_staticText1161->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Calibri") ) );
	
	bSizer691->Add( m_staticText1161, 0, wxTOP, 5 );
	
	m_spinCtrl1 = new wxSpinCtrl( plot_control_panel, ID_SPINCTRL, wxEmptyString, wxDefaultPosition, wxSize( 45,-1 ), wxSP_ARROW_KEYS, 1, 256, 8 );
	m_spinCtrl1->SetToolTip( wxT("Select the number of signals shone on screen") );
	
	bSizer691->Add( m_spinCtrl1, 0, wxALIGN_CENTER|wxALL, 5 );
	
	bSizer72->Add( bSizer691, 0, wxRIGHT, 5 );
	
	wxBoxSizer* bSizer69;
	bSizer69 = new wxBoxSizer( wxVERTICAL );
	
	m_staticText116 = new wxStaticText( plot_control_panel, wxID_ANY, wxT("Page:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText116->Wrap( -1 );
	m_staticText116->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Calibri") ) );
	
	bSizer69->Add( m_staticText116, 0, wxALIGN_CENTER|wxTOP, 5 );
	
	wxArrayString m_PageChoices;
	m_Page = new wxChoice( plot_control_panel, ID_PAGE, wxDefaultPosition, wxSize( 36,-1 ), m_PageChoices, 0 );
	m_Page->SetSelection( 0 );
	m_Page->SetToolTip( wxT("Select thagee plot ") );
	
	bSizer69->Add( m_Page, 0, wxALIGN_CENTER|wxALL, 5 );
	
	bSizer72->Add( bSizer69, 0, wxRIGHT, 5 );
	
	plot_control_panel->SetSizer( bSizer72 );
	plot_control_panel->Layout();
	ChoiceSizer->Add( plot_control_panel, 1, wxALIGN_CENTER|wxLEFT|wxRIGHT, 5 );
	
	PlotControlsClosed = new wxBitmapButton( ControlPanel, wxID_Show, wxBitmap( wxT("Media/plot buttons/Controls_closed.bmp"), wxBITMAP_TYPE_ANY ), wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|wxNO_BORDER );
	
	PlotControlsClosed->SetBitmapSelected( wxBitmap( wxT("Media/plot buttons/Controls_pressed_closed.bmp"), wxBITMAP_TYPE_ANY ) );
	PlotControlsClosed->Hide();
	
	PlotControlsClosed->Hide();
	
	ChoiceSizer->Add( PlotControlsClosed, 0, wxALL|wxBOTTOM|wxLEFT|wxTOP, 5 );
	
	ControlPanel->SetSizer( ChoiceSizer );
	ControlPanel->Layout();
	ChoiceSizer->Fit( ControlPanel );
	BigSizer->Add( ControlPanel, 0, wxEXPAND, 5 );
	
	m_HelpPanel = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxSize( 800,500 ), wxTAB_TRAVERSAL );
	m_HelpPanel->SetToolTip( wxT("Active the scope to check the signals value") );
	m_HelpPanel->SetMinSize( wxSize( 800,500 ) );
	
	PlotSizer = new wxBoxSizer( wxVERTICAL );
	
	PlotSizer->SetMinSize( wxSize( 640,400 ) ); 
	m_HelpPanel->SetSizer( PlotSizer );
	m_HelpPanel->Layout();
	BigSizer->Add( m_HelpPanel, 1, wxEXPAND, 5 );
	
	this->SetSizer( BigSizer );
	this->Layout();
	BigSizer->Fit( this );
	
	// Connect Events
	this->Connect( wxEVT_IDLE, wxIdleEventHandler( PlotFrame::OnIdle ) );
	m_spinCtrl1->Connect( wxEVT_COMMAND_SPINCTRL_UPDATED, wxSpinEventHandler( PlotFrame::OnChannelNumber ), NULL, this );
	m_Page->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PlotFrame::OnChangePage ), NULL, this );
}

PlotFrame::~PlotFrame()
{
	// Disconnect Events
	this->Disconnect( wxEVT_IDLE, wxIdleEventHandler( PlotFrame::OnIdle ) );
	m_spinCtrl1->Disconnect( wxEVT_COMMAND_SPINCTRL_UPDATED, wxSpinEventHandler( PlotFrame::OnChannelNumber ), NULL, this );
	m_Page->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PlotFrame::OnChangePage ), NULL, this );
}

MainFrame::MainFrame( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize );
	
	wxMenuBar* m_menubar1;
	m_menubar1 = new wxMenuBar( 0 );
	m_menubar1->Hide();
	
	FileMenu = new wxMenu();
	savemenu = new wxMenuItem( FileMenu, wxSAVE_BUTTON, wxString( wxT("&Save as... file") ) + wxT('\t') + wxT("Alt+s"), wxT("Save as...\nSelect filename, path and format of the saved file.\nIf no file is selected, HIM automatically save data in c:HIMSaves with filename Default*.bin and Defaul*.dat"), wxITEM_NORMAL );
	FileMenu->Append(savemenu);
	m_database = new wxMenuItem( FileMenu, ID_DB, wxString( wxT("Save in &DB") ) + wxT('\t') + wxT("Alt+d"), wxT("Save signals into database. The file *.bin is however saved."), wxITEM_NORMAL );
	FileMenu->Append(m_database);
	m_database->Enable( false );
	
	openmenu = new wxMenuItem( FileMenu, wxOPEN_BUTTON, wxString( wxT("&Open file...") ) + wxT('\t') + wxT("Alt+o"), wxT("Open File for play file virtual instrument. \nThe file could be played looped."), wxITEM_NORMAL );
	FileMenu->Append(openmenu);
	EnableSave = new wxMenuItem( FileMenu, wxID_EnableSave, wxString( wxT("Enable Save") ) , wxEmptyString, wxITEM_CHECK );
	FileMenu->Append(EnableSave);
	EnableSave->Check( true );
	
	
	
	exitmenu = new wxMenuItem( FileMenu, ID_FILE_EXIT, wxString( wxT("&Exit") ) + wxT('\t') + wxT("Alt-F4"), wxEmptyString, wxITEM_NORMAL );
	FileMenu->Append(exitmenu);
	m_menubar1->Append( FileMenu, wxT("&File") );
	
	WindowMenu = new wxMenu();
	showplot = new wxMenuItem( WindowMenu, ID_SHOWPLOT, wxString( wxT("Show &Plot") ) + wxT('\t') + wxT("Alt+p"), wxEmptyString, wxITEM_CHECK );
	WindowMenu->Append(showplot);
	showfeed = new wxMenuItem( WindowMenu, wxID_SHOWFEEDBACK, wxString( wxT("Show &Feedback Plot") ) + wxT('\t') + wxT("Alt+f"), wxEmptyString, wxITEM_CHECK );
	WindowMenu->Append(showfeed);
	hideall = new wxMenuItem( WindowMenu, ID_HIDE_ALL, wxString( wxT("Hide &All") ) + wxT('\t') + wxT("Alt+a"), wxEmptyString, wxITEM_NORMAL );
	WindowMenu->Append(hideall);
	m_menubar1->Append( WindowMenu, wxT("&Window") );
	
	HelpMenu = new wxMenu();
	wxMenuItem* helpGangia;
	helpGangia = new wxMenuItem( HelpMenu, HELPHIM, wxString( wxT("Help HIM") ) + wxT('\t') + wxT("Alt+F1"), wxEmptyString, wxITEM_NORMAL );
	HelpMenu->Append(helpGangia);
	wxMenuItem* helpbci;
	helpbci = new wxMenuItem( HelpMenu, HELPBCI, wxString( wxT("Help BCI++") ) + wxT('\t') + wxT("Alt+F2"), wxEmptyString, wxITEM_NORMAL );
	HelpMenu->Append(helpbci);
	
	
	wxMenuItem* about;
	about = new wxMenuItem( HelpMenu, ABOUT, wxString( wxT("About...") ) + wxT('\t') + wxT("Alt+F3"), wxEmptyString, wxITEM_NORMAL );
	HelpMenu->Append(about);
	m_menubar1->Append( HelpMenu, wxT("&Help") );
	
	this->SetMenuBar( m_menubar1 );
	
	
	// Connect Events
	this->Connect( wxEVT_CHAR, wxKeyEventHandler( MainFrame::OnKeyDown ) );
}

MainFrame::~MainFrame()
{
	// Disconnect Events
	this->Disconnect( wxEVT_CHAR, wxKeyEventHandler( MainFrame::OnKeyDown ) );
}

MainPanel::MainPanel( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style )
{
	this->SetBackgroundColour( wxColour( 240, 240, 240 ) );
	
	MainSizer = new wxFlexGridSizer( 5, 1, 0, 0 );
	MainSizer->SetFlexibleDirection( wxBOTH );
	MainSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_NONE );
	
	Row1 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	wxBoxSizer* bSizer68;
	bSizer68 = new wxBoxSizer( wxHORIZONTAL );
	
	m_bitmap9 = new wxStaticBitmap( Row1, wxID_ANY, wxBitmap( wxT("Media/BCILabel.bmp"), wxBITMAP_TYPE_ANY ), wxDefaultPosition, wxDefaultSize, 0 );
	m_bitmap9->Hide();
	
	bSizer68->Add( m_bitmap9, 0, wxLEFT|wxRIGHT, 5 );
	
	m_FileButton = new wxBitmapButton( Row1, wxIDFileMenu, wxBitmap( wxT("Media/BCILabel.bmp"), wxBITMAP_TYPE_ANY ), wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|wxNO_BORDER );
	bSizer68->Add( m_FileButton, 0, wxLEFT|wxRIGHT, 5 );
	
	m_bitmap6 = new wxStaticBitmap( Row1, wxID_ANY, wxBitmap( wxT("Media/interface buttons/input.bmp"), wxBITMAP_TYPE_ANY ), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer68->Add( m_bitmap6, 0, wxRIGHT, 5 );
	
	m_bitmap7 = new wxStaticBitmap( Row1, wxID_ANY, wxBitmap( wxT("Media/interface buttons/Processing.bmp"), wxBITMAP_TYPE_ANY ), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer68->Add( m_bitmap7, 0, wxRIGHT, 5 );
	
	m_bitmap8 = new wxStaticBitmap( Row1, wxID_ANY, wxBitmap( wxT("Media/interface buttons/output.bmp"), wxBITMAP_TYPE_ANY ), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer68->Add( m_bitmap8, 0, wxRIGHT, 5 );
	
	Row1->SetSizer( bSizer68 );
	Row1->Layout();
	bSizer68->Fit( Row1 );
	MainSizer->Add( Row1, 1, wxEXPAND, 5 );
	
	m_staticline2 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxSize( -1,1 ), wxLI_HORIZONTAL );
	MainSizer->Add( m_staticline2, 1, wxBOTTOM|wxEXPAND|wxTOP, 3 );
	
	Row2 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	wxBoxSizer* bSizer691;
	bSizer691 = new wxBoxSizer( wxHORIZONTAL );
	
	Row2Big = new wxPanel( Row2, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxTAB_TRAVERSAL );
	Row2Big->SetBackgroundColour( wxColour( 240, 240, 240 ) );
	
	wxBoxSizer* bSizer74;
	bSizer74 = new wxBoxSizer( wxHORIZONTAL );
	
	ControlOpened = new wxBitmapButton( Row2Big, wxIDControls, wxBitmap( wxT("Media/interface buttons/Controls_opened.bmp"), wxBITMAP_TYPE_ANY ), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|wxNO_BORDER );
	
	ControlOpened->SetBitmapSelected( wxBitmap( wxT("Media/interface buttons/Controls_pressed_opened.bmp"), wxBITMAP_TYPE_ANY ) );
	ControlOpened->SetToolTip( wxT("Reduce Control GUI") );
	
	ControlOpened->SetToolTip( wxT("Reduce Control GUI") );
	
	bSizer74->Add( ControlOpened, 0, wxLEFT|wxRIGHT, 5 );
	
	devicePanel = new wxPanel( Row2Big, wxPAINT, wxDefaultPosition, wxSize( 200,200 ), wxTAB_TRAVERSAL );
	devicePanel->SetBackgroundColour( wxColour( 211, 211, 211 ) );
	devicePanel->SetMinSize( wxSize( 200,200 ) );
	
	wxFlexGridSizer* fgSizer13;
	fgSizer13 = new wxFlexGridSizer( 4, 1, 0, 0 );
	fgSizer13->SetFlexibleDirection( wxBOTH );
	fgSizer13->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
	
	fgSizer13->SetMinSize( wxSize( 200,200 ) ); 
	SelectDeviceLabel = new wxStaticText( devicePanel, wxID_ANY, wxT("Select device:"), wxDefaultPosition, wxDefaultSize, 0 );
	SelectDeviceLabel->Wrap( -1 );
	SelectDeviceLabel->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Calibri") ) );
	
	fgSizer13->Add( SelectDeviceLabel, 0, wxLEFT|wxTOP, 5 );
	
	wxString DeviceKindChoices[] = { wxT("-- Virtual Instrument --"), wxT("Simulator"), wxT("Play file"), wxT("Interactive file (SSVEP)"), wxT("-- Brainproducts --"), wxT("VisionRecorder"), wxT("VAmp USB"), wxT("-- g.tec --"), wxT("g.MOBIlab"), wxT("g.USBamp"), wxT("-- Compumedics --"), wxT("Neuroscan"), wxT("-- Braintroics --"), wxT("Brainbox 1042"), wxT("Brainbox 1142"), wxT("BrainBox 1164"), wxT("BrainBox 1166"), wxT("-- SXT --"), wxT("Protheo II"), wxT("Phedra"), wxT("-- Politecnico di Milano --"), wxT("KimeraII"), wxT("PLE"), wxT("Bluesilk"), wxT("ResegUP DB"), wxT("TermoPLE"), wxT("PLE 16bit"), wxT("ArduinoECG"), wxT("-- Comftech --"), wxT("Daddy"), wxT("-- Emotiv --"), wxT("Epoc"), wxT("Configurable Epoc") };
	int DeviceKindNChoices = sizeof( DeviceKindChoices ) / sizeof( wxString );
	DeviceKind = new wxChoice( devicePanel, wxID_DEV, wxDefaultPosition, wxDefaultSize, DeviceKindNChoices, DeviceKindChoices, 0 );
	DeviceKind->SetSelection( 0 );
	DeviceKind->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Calibri") ) );
	DeviceKind->SetToolTip( wxT("Select the instrument to be connected to HIM. \nThe GUI is auto-updated with the relative features.") );
	DeviceKind->SetMinSize( wxSize( 176,30 ) );
	
	fgSizer13->Add( DeviceKind, 0, wxLEFT|wxTOP, 5 );
	
	PortComLabel = new wxStaticText( devicePanel, wxID_ANY, wxT("Com Port"), wxDefaultPosition, wxDefaultSize, 0 );
	PortComLabel->Wrap( -1 );
	PortComLabel->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Calibri") ) );
	
	fgSizer13->Add( PortComLabel, 0, wxLEFT, 5 );
	
	PortUSBLabel = new wxStaticText( devicePanel, wxID_ANY, wxT("USB Port"), wxDefaultPosition, wxDefaultSize, 0 );
	PortUSBLabel->Wrap( -1 );
	PortUSBLabel->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Calibri") ) );
	PortUSBLabel->Hide();
	
	fgSizer13->Add( PortUSBLabel, 0, wxLEFT, 5 );
	
	wxString NavComChoices[] = { wxT("COM1"), wxT("COM2"), wxT("COM3"), wxT("COM4"), wxT("COM5"), wxT("COM6"), wxT("COM7"), wxT("COM8"), wxT("COM9"), wxT("COM10"), wxT("COM11"), wxT("COM12"), wxT("COM13"), wxT("COM14"), wxT("COM15"), wxT("COM16"), wxT("COM17"), wxT("COM18"), wxT("COM19"), wxT("COM20"), wxT("COM21"), wxT("COM22"), wxT("COM23"), wxT("COM24"), wxT("COM25"), wxT("COM26"), wxT("COM27"), wxT("COM28"), wxT("COM29"), wxT("COM30"), wxT("COM31"), wxT("COM32"), wxT("COM33"), wxT("COM34"), wxT("COM35"), wxT("COM36"), wxT("COM37"), wxT("COM38"), wxT("COM39"), wxT("COM40"), wxT("COM41"), wxT("COM42"), wxT("COM43"), wxT("COM44"), wxT("COM45"), wxT("COM46"), wxT("COM47"), wxT("COM48"), wxT("COM49"), wxT("COM50"), wxT("COM51"), wxT("COM52"), wxT("COM53"), wxT("COM54"), wxT("COM55"), wxT("COM56"), wxT("COM57"), wxT("COM58"), wxT("COM59"), wxT("COM60"), wxT("COM61"), wxT("COM62"), wxT("COM63"), wxT("COM64"), wxT("COM65"), wxT("COM66"), wxT("COM67"), wxT("COM68"), wxT("COM69"), wxT("COM70"), wxT("COM71"), wxT("COM72"), wxT("COM73"), wxT("COM74"), wxT("COM75"), wxT("COM76"), wxT("COM77"), wxT("COM78"), wxT("COM79"), wxT("COM80"), wxT("COM81"), wxT("COM82"), wxT("COM83"), wxT("COM84"), wxT("COM85"), wxT("COM86"), wxT("COM87"), wxT("COM88"), wxT("COM89"), wxT("COM90") };
	int NavComNChoices = sizeof( NavComChoices ) / sizeof( wxString );
	NavCom = new wxChoice( devicePanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, NavComNChoices, NavComChoices, 0 );
	NavCom->SetSelection( 4 );
	NavCom->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Calibri") ) );
	NavCom->SetToolTip( wxT("Select Port COM for your serial/Bluetooth device. If you don't know your COM port, please check it in \"Device settings\" under Control Panel. ") );
	NavCom->SetMinSize( wxSize( 176,30 ) );
	
	fgSizer13->Add( NavCom, 0, wxLEFT|wxTOP, 5 );
	
	wxString NavUSBChoices[] = { wxT("USB1"), wxT("USB2"), wxT("USB3"), wxT("USB4"), wxT("USB5"), wxT("USB6") };
	int NavUSBNChoices = sizeof( NavUSBChoices ) / sizeof( wxString );
	NavUSB = new wxChoice( devicePanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, NavUSBNChoices, NavUSBChoices, 0 );
	NavUSB->SetSelection( 0 );
	NavUSB->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Calibri") ) );
	NavUSB->Hide();
	NavUSB->SetToolTip( wxT("Select Port COM for your serial/Bluetooth device. If you don't know your COM port, please check it in \"Device settings\" under Control Panel. ") );
	NavUSB->SetMinSize( wxSize( 176,30 ) );
	
	fgSizer13->Add( NavUSB, 0, wxALL, 5 );
	
	wxBoxSizer* bSizer105;
	bSizer105 = new wxBoxSizer( wxHORIZONTAL );
	
	n_Label = new wxStaticText( devicePanel, wxID_ANY, wxT("N°:"), wxDefaultPosition, wxDefaultSize, 0 );
	n_Label->Wrap( -1 );
	n_Label->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Calibri") ) );
	n_Label->Hide();
	
	bSizer105->Add( n_Label, 0, wxALIGN_CENTER|wxLEFT|wxTOP, 5 );
	
	wxArrayString n_brainboxChoices;
	n_brainbox = new wxChoice( devicePanel, wxID_ANY, wxDefaultPosition, wxSize( 30,-1 ), n_brainboxChoices, 0 );
	n_brainbox->SetSelection( 0 );
	n_brainbox->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Calibri") ) );
	n_brainbox->Hide();
	n_brainbox->SetToolTip( wxT("Select number of BrainBox connected.") );
	
	bSizer105->Add( n_brainbox, 0, wxLEFT|wxTOP, 5 );
	
	SampleLabel = new wxStaticText( devicePanel, wxID_ANY, wxT("Sample Freq:"), wxDefaultPosition, wxDefaultSize, 0 );
	SampleLabel->Wrap( -1 );
	SampleLabel->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Calibri") ) );
	SampleLabel->Hide();
	
	bSizer105->Add( SampleLabel, 0, wxALIGN_CENTER|wxLEFT|wxTOP, 5 );
	
	wxString sampleBrainChoices[] = { wxT("64"), wxT("128"), wxT("256"), wxT("512"), wxT("1024") };
	int sampleBrainNChoices = sizeof( sampleBrainChoices ) / sizeof( wxString );
	sampleBrain = new wxChoice( devicePanel, wxID_ANY, wxDefaultPosition, wxSize( 50,-1 ), sampleBrainNChoices, sampleBrainChoices, 0 );
	sampleBrain->SetSelection( 2 );
	sampleBrain->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Calibri") ) );
	sampleBrain->Hide();
	sampleBrain->SetToolTip( wxT("Select the sample frequiency of BrainBox") );
	
	bSizer105->Add( sampleBrain, 0, wxLEFT|wxTOP, 5 );
	
	fgSizer13->Add( bSizer105, 1, wxEXPAND, 5 );
	
	my_dns_label = new wxStaticText( devicePanel, wxID_ANY, wxT("Database dns:"), wxDefaultPosition, wxDefaultSize, 0 );
	my_dns_label->Wrap( -1 );
	my_dns_label->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Calibri") ) );
	my_dns_label->Hide();
	
	fgSizer13->Add( my_dns_label, 0, wxLEFT, 5 );
	
	wxBoxSizer* bSizer102;
	bSizer102 = new wxBoxSizer( wxHORIZONTAL );
	
	my_dns_db = new wxTextCtrl( devicePanel, wxID_ANY, wxT("Database_dns"), wxDefaultPosition, wxDefaultSize, 0 );
	my_dns_db->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Calibri") ) );
	my_dns_db->Hide();
	my_dns_db->SetToolTip( wxT("Write the DNS name for your database. Please read the help session to know how to create dns connection in windows.") );
	my_dns_db->SetMinSize( wxSize( 176,-1 ) );
	
	bSizer102->Add( my_dns_db, 0, wxALIGN_CENTER|wxALL|wxEXPAND, 5 );
	
	help_db = new wxBitmapButton( devicePanel, ID_HelpDB, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW );
	help_db->Hide();
	help_db->SetMinSize( wxSize( 20,20 ) );
	
	help_db->Hide();
	help_db->SetMinSize( wxSize( 20,20 ) );
	
	bSizer102->Add( help_db, 0, wxALIGN_CENTER|wxLEFT, 5 );
	
	fgSizer13->Add( bSizer102, 1, wxEXPAND, 5 );
	
	wxBoxSizer* bSizer106;
	bSizer106 = new wxBoxSizer( wxHORIZONTAL );
	
	my_host_label = new wxStaticText( devicePanel, wxID_ANY, wxT("IP Address:"), wxDefaultPosition, wxDefaultSize, 0 );
	my_host_label->Wrap( -1 );
	my_host_label->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Calibri") ) );
	my_host_label->Hide();
	my_host_label->SetMinSize( wxSize( 120,-1 ) );
	
	bSizer106->Add( my_host_label, 0, wxLEFT|wxRIGHT, 5 );
	
	my_host_port = new wxStaticText( devicePanel, wxID_ANY, wxT("Port:"), wxDefaultPosition, wxDefaultSize, 0 );
	my_host_port->Wrap( -1 );
	my_host_port->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Calibri") ) );
	my_host_port->Hide();
	
	bSizer106->Add( my_host_port, 0, wxLEFT|wxRIGHT, 5 );
	
	fgSizer13->Add( bSizer106, 1, wxEXPAND, 5 );
	
	wxBoxSizer* bSizer1021;
	bSizer1021 = new wxBoxSizer( wxHORIZONTAL );
	
	my_host = new wxTextCtrl( devicePanel, wxID_ANY, wxT("127.0.0.1"), wxDefaultPosition, wxDefaultSize, 0 );
	my_host->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Calibri") ) );
	my_host->Hide();
	my_host->SetToolTip( wxT("Enter the IP address or the computer name where the database is located.") );
	my_host->SetMinSize( wxSize( 120,-1 ) );
	
	bSizer1021->Add( my_host, 0, wxALIGN_CENTER|wxLEFT|wxRIGHT, 5 );
	
	my_hostport = new wxTextCtrl( devicePanel, wxID_ANY, wxT("4000"), wxDefaultPosition, wxDefaultSize, 0 );
	my_hostport->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Calibri") ) );
	my_hostport->Hide();
	my_hostport->SetToolTip( wxT("Enter the port for sql connection. The default port is usually 4000") );
	my_hostport->SetMinSize( wxSize( 45,-1 ) );
	
	bSizer1021->Add( my_hostport, 0, wxALL, 5 );
	
	fgSizer13->Add( bSizer1021, 1, wxEXPAND, 5 );
	
	wxFlexGridSizer* fgSizer131;
	fgSizer131 = new wxFlexGridSizer( 2, 2, 0, 10 );
	fgSizer131->SetFlexibleDirection( wxBOTH );
	fgSizer131->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
	
	LoadedFileLabel = new wxStaticText( devicePanel, wxID_ANY, wxT("Loaded file:"), wxDefaultPosition, wxDefaultSize, 0 );
	LoadedFileLabel->Wrap( -1 );
	LoadedFileLabel->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Calibri") ) );
	LoadedFileLabel->Hide();
	
	fgSizer131->Add( LoadedFileLabel, 0, wxLEFT, 5 );
	
	LoadedFile = new wxStaticText( devicePanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	LoadedFile->Wrap( -1 );
	LoadedFile->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Calibri") ) );
	
	fgSizer131->Add( LoadedFile, 0, wxLEFT, 5 );
	
	fgSizer13->Add( fgSizer131, 0, wxEXPAND, 5 );
	
	m_loop = new wxCheckBox( devicePanel, wxID_ANY, wxT("Play repeated"), wxDefaultPosition, wxDefaultSize, 0 );
	
	m_loop->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Calibri") ) );
	m_loop->Hide();
	m_loop->SetToolTip( wxT("Check if you want to play the selected file looped.") );
	
	fgSizer13->Add( m_loop, 0, wxBOTTOM|wxLEFT|wxTOP, 5 );
	
	Configure = new wxButton( devicePanel, wxID_Configure, wxT("Configure"), wxDefaultPosition, wxSize( 110,-1 ), 0 );
	Configure->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Calibri") ) );
	Configure->Hide();
	Configure->SetToolTip( wxT("Click to open configuration file") );
	
	fgSizer13->Add( Configure, 0, wxALL, 5 );
	
	CheckImp = new wxButton( devicePanel, wxID_CheckImp, wxT("Check Impedance"), wxDefaultPosition, wxSize( 110,-1 ), 0 );
	CheckImp->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Calibri") ) );
	CheckImp->Hide();
	CheckImp->SetToolTip( wxT("Click to check impedance.") );
	
	fgSizer13->Add( CheckImp, 0, wxALL, 5 );
	
	bSizer10 = new wxBoxSizer( wxHORIZONTAL );
	
	m_ConnButton = new wxButton( devicePanel, wxREMOTE, wxT("Connect"), wxDefaultPosition, wxSize( 110,-1 ), 0 );
	m_ConnButton->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Calibri") ) );
	m_ConnButton->SetToolTip( wxT("Click to connect to the device.") );
	
	bSizer10->Add( m_ConnButton, 0, wxLEFT|wxTOP, 5 );
	
	m_DisConnButton = new wxButton( devicePanel, wxDISCONNECT, wxT("Disconnect"), wxDefaultPosition, wxDefaultSize, 0 );
	m_DisConnButton->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Calibri") ) );
	m_DisConnButton->Enable( false );
	m_DisConnButton->Hide();
	m_DisConnButton->SetToolTip( wxT("Click to disconnect device.") );
	
	bSizer10->Add( m_DisConnButton, 0, wxALL, 5 );
	
	fgSizer13->Add( bSizer10, 0, 0, 0 );
	
	devicePanel->SetSizer( fgSizer13 );
	devicePanel->Layout();
	bSizer74->Add( devicePanel, 0, wxRIGHT, 5 );
	
	ProcessingPanel = new wxPanel( Row2Big, wxID_ANY, wxDefaultPosition, wxSize( 200,200 ), wxTAB_TRAVERSAL );
	ProcessingPanel->SetBackgroundColour( wxColour( 211, 211, 211 ) );
	
	wxFlexGridSizer* fgSizer14;
	fgSizer14 = new wxFlexGridSizer( 5, 1, 0, 0 );
	fgSizer14->SetFlexibleDirection( wxBOTH );
	fgSizer14->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
	
	fgSizer14->SetMinSize( wxSize( 200,200 ) ); 
	AlgoLabel = new wxStaticText( ProcessingPanel, wxID_ANY, wxT("Select algorithm:"), wxDefaultPosition, wxDefaultSize, 0 );
	AlgoLabel->Wrap( -1 );
	AlgoLabel->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Calibri") ) );
	
	fgSizer14->Add( AlgoLabel, 0, wxLEFT|wxTOP, 5 );
	
	wxArrayString m_AlgoChoiceChoices;
	m_AlgoChoice = new wxChoice( ProcessingPanel, wxID_ALGOCHOICE, wxDefaultPosition, wxDefaultSize, m_AlgoChoiceChoices, 0 );
	m_AlgoChoice->SetSelection( 0 );
	m_AlgoChoice->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Calibri") ) );
	m_AlgoChoice->SetToolTip( wxT("Select Matlab algorithm.") );
	m_AlgoChoice->SetMinSize( wxSize( 180,30 ) );
	
	fgSizer14->Add( m_AlgoChoice, 0, wxLEFT|wxTOP, 5 );
	
	MatlabLabel = new wxStaticText( ProcessingPanel, wxID_ANY, wxT("Matlab:"), wxDefaultPosition, wxDefaultSize, 0 );
	MatlabLabel->Wrap( -1 );
	MatlabLabel->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Calibri") ) );
	
	fgSizer14->Add( MatlabLabel, 0, wxLEFT, 5 );
	
	wxFlexGridSizer* fgSizer20;
	fgSizer20 = new wxFlexGridSizer( 1, 2, 0, 10 );
	fgSizer20->SetFlexibleDirection( wxBOTH );
	fgSizer20->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
	
	m_MatlabButton = new wxBitmapButton( ProcessingPanel, wxID_MATLABBUTT, wxBitmap( wxT("Media/buttons/matlab.bmp"), wxBITMAP_TYPE_ANY ), wxDefaultPosition, wxSize( 50,50 ), wxBU_AUTODRAW );
	
	m_MatlabButton->SetBitmapDisabled( wxBitmap( wxT("Media/buttons/matlabInactive.bmp"), wxBITMAP_TYPE_ANY ) );
	m_MatlabButton->SetBitmapSelected( wxBitmap( wxT("Media/buttons/matlabPressed.bmp"), wxBITMAP_TYPE_ANY ) );
	m_MatlabButton->SetToolTip( wxT("Activate algorithm") );
	
	m_MatlabButton->SetToolTip( wxT("Activate algorithm") );
	
	fgSizer20->Add( m_MatlabButton, 0, wxTOP, 5 );
	
	m_CloseMatlab = new wxBitmapButton( ProcessingPanel, wxID_CLOSE_MATLAB, wxBitmap( wxT("Media/buttons/CloseMatlab.bmp"), wxBITMAP_TYPE_ANY ), wxDefaultPosition, wxSize( 50,50 ), wxBU_AUTODRAW );
	
	m_CloseMatlab->SetBitmapDisabled( wxBitmap( wxT("Media/buttons/CloseMatlabInactive.bmp"), wxBITMAP_TYPE_ANY ) );
	m_CloseMatlab->SetBitmapSelected( wxBitmap( wxT("Media/buttons/CloseMatlabPressed.bmp"), wxBITMAP_TYPE_ANY ) );
	m_CloseMatlab->Enable( false );
	m_CloseMatlab->SetToolTip( wxT("Closes algorithm") );
	
	m_CloseMatlab->Enable( false );
	m_CloseMatlab->SetToolTip( wxT("Closes algorithm") );
	
	fgSizer20->Add( m_CloseMatlab, 0, wxLEFT|wxTOP, 5 );
	
	fgSizer14->Add( fgSizer20, 1, wxEXPAND|wxLEFT, 5 );
	
	ProcControlsLabel = new wxStaticText( ProcessingPanel, wxID_ANY, wxT("Controls:"), wxDefaultPosition, wxDefaultSize, 0 );
	ProcControlsLabel->Wrap( -1 );
	ProcControlsLabel->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Calibri") ) );
	
	fgSizer14->Add( ProcControlsLabel, 0, wxLEFT|wxTOP, 5 );
	
	wxFlexGridSizer* fgSizer21;
	fgSizer21 = new wxFlexGridSizer( 1, 3, 0, 10 );
	fgSizer21->SetFlexibleDirection( wxBOTH );
	fgSizer21->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
	
	m_StartButton = new wxBitmapButton( ProcessingPanel, wxID_STARTBUTTON, wxBitmap( wxT("Media/buttons/play.bmp"), wxBITMAP_TYPE_ANY ), wxDefaultPosition, wxSize( 50,50 ), wxBU_AUTODRAW );
	
	m_StartButton->SetBitmapDisabled( wxBitmap( wxT("Media/buttons/play inactive.bmp"), wxBITMAP_TYPE_ANY ) );
	m_StartButton->SetBitmapSelected( wxBitmap( wxT("Media/buttons/play pressed.bmp"), wxBITMAP_TYPE_ANY ) );
	m_StartButton->Enable( false );
	m_StartButton->SetToolTip( wxT("Start acquisition") );
	
	m_StartButton->Enable( false );
	m_StartButton->SetToolTip( wxT("Start acquisition") );
	
	fgSizer21->Add( m_StartButton, 0, 0, 5 );
	
	m_StopButton = new wxBitmapButton( ProcessingPanel, wxID_STOPBUTTON, wxBitmap( wxT("Media/buttons/stop.bmp"), wxBITMAP_TYPE_ANY ), wxDefaultPosition, wxSize( 50,50 ), wxBU_AUTODRAW );
	
	m_StopButton->SetBitmapDisabled( wxBitmap( wxT("Media/buttons/stop inactive.bmp"), wxBITMAP_TYPE_ANY ) );
	m_StopButton->SetBitmapSelected( wxBitmap( wxT("Media/buttons/stop pressed.bmp"), wxBITMAP_TYPE_ANY ) );
	m_StopButton->Enable( false );
	m_StopButton->SetToolTip( wxT("Stop acquisition") );
	
	m_StopButton->Enable( false );
	m_StopButton->SetToolTip( wxT("Stop acquisition") );
	
	fgSizer21->Add( m_StopButton, 0, wxLEFT, 5 );
	
	m_ShowPlotButt = new wxBitmapButton( ProcessingPanel, ID_SHOWPLOT, wxBitmap( wxT("Media/buttons/graph.bmp"), wxBITMAP_TYPE_ANY ), wxPoint( -1,-1 ), wxSize( 50,50 ), wxBU_AUTODRAW );
	
	m_ShowPlotButt->SetBitmapDisabled( wxBitmap( wxT("Media/buttons/graph inactive.bmp"), wxBITMAP_TYPE_ANY ) );
	m_ShowPlotButt->SetBitmapSelected( wxBitmap( wxT("Media/buttons/graph pressed.bmp"), wxBITMAP_TYPE_ANY ) );
	m_ShowPlotButt->Enable( false );
	m_ShowPlotButt->SetToolTip( wxT("Show/Hide signals plot") );
	
	m_ShowPlotButt->Enable( false );
	m_ShowPlotButt->SetToolTip( wxT("Show/Hide signals plot") );
	
	fgSizer21->Add( m_ShowPlotButt, 0, wxLEFT, 5 );
	
	fgSizer14->Add( fgSizer21, 1, wxEXPAND|wxLEFT, 5 );
	
	ProcessingPanel->SetSizer( fgSizer14 );
	ProcessingPanel->Layout();
	bSizer74->Add( ProcessingPanel, 0, wxRIGHT, 5 );
	
	OutputPanel = new wxPanel( Row2Big, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	OutputPanel->SetBackgroundColour( wxColour( 211, 211, 211 ) );
	
	wxFlexGridSizer* fgSizer141;
	fgSizer141 = new wxFlexGridSizer( 6, 1, 0, 0 );
	fgSizer141->SetFlexibleDirection( wxBOTH );
	fgSizer141->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
	
	fgSizer141->SetMinSize( wxSize( 200,200 ) ); 
	OutLogLabel = new wxStaticText( OutputPanel, wxID_ANY, wxT("Output log:"), wxDefaultPosition, wxDefaultSize, 0 );
	OutLogLabel->Wrap( -1 );
	OutLogLabel->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Calibri") ) );
	
	fgSizer141->Add( OutLogLabel, 0, wxLEFT|wxTOP, 5 );
	
	OutputLog = new wxTextCtrl( OutputPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 190,80 ), wxTE_MULTILINE|wxTE_READONLY|wxSTATIC_BORDER|wxVSCROLL );
	OutputLog->SetToolTip( wxT("Log") );
	
	fgSizer141->Add( OutputLog, 1, wxLEFT|wxTOP, 5 );
	
	wxBoxSizer* bSizer82;
	bSizer82 = new wxBoxSizer( wxHORIZONTAL );
	
	m_staticText119 = new wxStaticText( OutputPanel, wxID_ANY, wxT("Filename:   "), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText119->Wrap( -1 );
	m_staticText119->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Calibri") ) );
	
	bSizer82->Add( m_staticText119, 0, wxLEFT, 5 );
	
	pFilename = new wxStaticText( OutputPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	pFilename->Wrap( -1 );
	pFilename->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Calibri") ) );
	pFilename->SetToolTip( wxT("Saved file.") );
	
	bSizer82->Add( pFilename, 0, 0, 5 );
	
	fgSizer141->Add( bSizer82, 1, wxEXPAND, 5 );
	
	OutControlsLabel = new wxStaticText( OutputPanel, wxID_ANY, wxT("Controls:"), wxDefaultPosition, wxDefaultSize, 0 );
	OutControlsLabel->Wrap( -1 );
	OutControlsLabel->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Calibri") ) );
	
	fgSizer141->Add( OutControlsLabel, 0, wxLEFT|wxTOP, 5 );
	
	wxFlexGridSizer* fgSizer211;
	fgSizer211 = new wxFlexGridSizer( 1, 3, 0, 10 );
	fgSizer211->SetFlexibleDirection( wxBOTH );
	fgSizer211->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
	
	m_ShowFeedButt = new wxBitmapButton( OutputPanel, wxID_SHOWFEEDBACK, wxBitmap( wxT("Media/buttons/feedback.bmp"), wxBITMAP_TYPE_ANY ), wxDefaultPosition, wxSize( 50,50 ), wxBU_AUTODRAW );
	
	m_ShowFeedButt->SetBitmapDisabled( wxBitmap( wxT("Media/buttons/feedbackInactive.bmp"), wxBITMAP_TYPE_ANY ) );
	m_ShowFeedButt->SetBitmapSelected( wxBitmap( wxT("Media/buttons/feedbackpressed.bmp"), wxBITMAP_TYPE_ANY ) );
	m_ShowFeedButt->Enable( false );
	m_ShowFeedButt->SetToolTip( wxT("Show feedbacks plot") );
	
	m_ShowFeedButt->Enable( false );
	m_ShowFeedButt->SetToolTip( wxT("Show feedbacks plot") );
	
	fgSizer211->Add( m_ShowFeedButt, 0, 0, 5 );
	
	AEnima_Run = new wxBitmapButton( OutputPanel, wxID_AENIMA, wxBitmap( wxT("Media/buttons/AEnima.bmp"), wxBITMAP_TYPE_ANY ), wxDefaultPosition, wxSize( 50,50 ), wxBU_AUTODRAW );
	
	AEnima_Run->SetBitmapDisabled( wxBitmap( wxT("Media/buttons/AEnimaDisabled.bmp"), wxBITMAP_TYPE_ANY ) );
	AEnima_Run->SetBitmapSelected( wxBitmap( wxT("Media/buttons/AEnimaPressed.bmp"), wxBITMAP_TYPE_ANY ) );
	AEnima_Run->SetToolTip( wxT("Start BCI Main Panel") );
	
	AEnima_Run->SetToolTip( wxT("Start BCI Main Panel") );
	
	fgSizer211->Add( AEnima_Run, 0, 0, 5 );
	
	fgSizer141->Add( fgSizer211, 1, wxEXPAND|wxLEFT|wxTOP, 5 );
	
	OutputPanel->SetSizer( fgSizer141 );
	OutputPanel->Layout();
	fgSizer141->Fit( OutputPanel );
	bSizer74->Add( OutputPanel, 0, wxRIGHT, 5 );
	
	Row2Big->SetSizer( bSizer74 );
	Row2Big->Layout();
	bSizer74->Fit( Row2Big );
	bSizer691->Add( Row2Big, 1, wxEXPAND, 5 );
	
	Row2Small = new wxPanel( Row2, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxTAB_TRAVERSAL );
	Row2Small->SetBackgroundColour( wxColour( 240, 240, 240 ) );
	Row2Small->Hide();
	
	wxBoxSizer* bSizer742;
	bSizer742 = new wxBoxSizer( wxHORIZONTAL );
	
	m_ControlClosed = new wxBitmapButton( Row2Small, wxIDControls, wxBitmap( wxT("Media/interface buttons/Controls_closed.bmp"), wxBITMAP_TYPE_ANY ), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|wxNO_BORDER );
	
	m_ControlClosed->SetBitmapSelected( wxBitmap( wxT("Media/interface buttons/Controls_pressed_closed.bmp"), wxBITMAP_TYPE_ANY ) );
	m_ControlClosed->SetToolTip( wxT("Enlarge Control GUI") );
	
	m_ControlClosed->SetToolTip( wxT("Enlarge Control GUI") );
	
	bSizer742->Add( m_ControlClosed, 0, wxLEFT|wxRIGHT, 5 );
	
	devicePanel1 = new wxPanel( Row2Small, wxID_ANY, wxDefaultPosition, wxSize( 200,-1 ), wxTAB_TRAVERSAL );
	devicePanel1->SetBackgroundColour( wxColour( 211, 211, 211 ) );
	devicePanel1->SetMinSize( wxSize( 200,-1 ) );
	
	wxBoxSizer* bSizer81;
	bSizer81 = new wxBoxSizer( wxHORIZONTAL );
	
	bSizer81->SetMinSize( wxSize( 200,21 ) ); 
	m_DevName = new wxStaticText( devicePanel1, wxID_ANY, wxT("Device:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_DevName->Wrap( -1 );
	m_DevName->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Calibri") ) );
	
	bSizer81->Add( m_DevName, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
	
	
	bSizer81->Add( 10, 0, 0, wxEXPAND, 5 );
	
	m_NameDevice = new wxStaticText( devicePanel1, wxID_ANY, wxT("Name"), wxDefaultPosition, wxDefaultSize, 0 );
	m_NameDevice->Wrap( -1 );
	m_NameDevice->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Calibri") ) );
	
	bSizer81->Add( m_NameDevice, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
	
	devicePanel1->SetSizer( bSizer81 );
	devicePanel1->Layout();
	bSizer742->Add( devicePanel1, 0, wxRIGHT, 5 );
	
	ProcessingPanel1 = new wxPanel( Row2Small, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxTAB_TRAVERSAL );
	ProcessingPanel1->SetBackgroundColour( wxColour( 211, 211, 211 ) );
	
	wxGridSizer* gSizer11;
	gSizer11 = new wxGridSizer( 2, 2, 0, 0 );
	
	gSizer11->SetMinSize( wxSize( 200,21 ) ); 
	mAlgoName = new wxStaticText( ProcessingPanel1, wxID_ANY, wxT("Algorithm:"), wxDefaultPosition, wxDefaultSize, 0 );
	mAlgoName->Wrap( -1 );
	mAlgoName->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Calibri") ) );
	
	gSizer11->Add( mAlgoName, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
	
	mAlgorithmName = new wxStaticText( ProcessingPanel1, wxID_ANY, wxT("AlgoName"), wxDefaultPosition, wxDefaultSize, 0 );
	mAlgorithmName->Wrap( -1 );
	mAlgorithmName->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Calibri") ) );
	
	gSizer11->Add( mAlgorithmName, 0, wxALIGN_CENTER_VERTICAL, 5 );
	
	ProcessingPanel1->SetSizer( gSizer11 );
	ProcessingPanel1->Layout();
	gSizer11->Fit( ProcessingPanel1 );
	bSizer742->Add( ProcessingPanel1, 0, wxRIGHT, 5 );
	
	OutputPanel1 = new wxPanel( Row2Small, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	OutputPanel1->SetBackgroundColour( wxColour( 211, 211, 211 ) );
	
	wxBoxSizer* bSizer86;
	bSizer86 = new wxBoxSizer( wxVERTICAL );
	
	OutputLog2 = new wxTextCtrl( OutputPanel1, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 200,-1 ), wxTE_READONLY|wxSTATIC_BORDER );
	OutputLog2->SetToolTip( wxT("Log") );
	
	bSizer86->Add( OutputLog2, 1, wxEXPAND, 5 );
	
	OutputPanel1->SetSizer( bSizer86 );
	OutputPanel1->Layout();
	bSizer86->Fit( OutputPanel1 );
	bSizer742->Add( OutputPanel1, 0, wxRIGHT, 5 );
	
	Row2Small->SetSizer( bSizer742 );
	Row2Small->Layout();
	bSizer742->Fit( Row2Small );
	bSizer691->Add( Row2Small, 1, wxEXPAND, 5 );
	
	Row2->SetSizer( bSizer691 );
	Row2->Layout();
	bSizer691->Fit( Row2 );
	MainSizer->Add( Row2, 1, wxEXPAND, 5 );
	
	Row3 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	wxBoxSizer* bSizer97;
	bSizer97 = new wxBoxSizer( wxHORIZONTAL );
	
	Row3Big = new wxPanel( Row3, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	wxBoxSizer* bSizer70;
	bSizer70 = new wxBoxSizer( wxHORIZONTAL );
	
	StatusOpened = new wxBitmapButton( Row3Big, wxIDStatus, wxBitmap( wxT("Media/interface buttons/Status_opened.bmp"), wxBITMAP_TYPE_ANY ), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|wxNO_BORDER );
	
	StatusOpened->SetBitmapSelected( wxBitmap( wxT("Media/interface buttons/Status_Pressed_Opened.bmp"), wxBITMAP_TYPE_ANY ) );
	StatusOpened->SetToolTip( wxT("Reduce Status GUI") );
	
	StatusOpened->SetToolTip( wxT("Reduce Status GUI") );
	
	bSizer70->Add( StatusOpened, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
	
	StatusInput = new wxPanel( Row3Big, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxTAB_TRAVERSAL );
	StatusInput->SetBackgroundColour( wxColour( 211, 211, 211 ) );
	
	wxBoxSizer* bSizer861;
	bSizer861 = new wxBoxSizer( wxVERTICAL );
	
	bSizer861->SetMinSize( wxSize( 200,100 ) ); 
	wxBoxSizer* bSizer87;
	bSizer87 = new wxBoxSizer( wxHORIZONTAL );
	
	m_staticText156 = new wxStaticText( StatusInput, wxID_ANY, wxT("Connection:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText156->Wrap( -1 );
	m_staticText156->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Calibri") ) );
	
	bSizer87->Add( m_staticText156, 0, wxLEFT|wxTOP, 5 );
	
	
	bSizer87->Add( 5, 0, 0, wxEXPAND, 5 );
	
	m_ConnectionStatus = new wxStaticText( StatusInput, wxID_ANY, wxT("Disactive"), wxDefaultPosition, wxDefaultSize, 0 );
	m_ConnectionStatus->Wrap( -1 );
	m_ConnectionStatus->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Calibri") ) );
	
	bSizer87->Add( m_ConnectionStatus, 0, wxLEFT|wxTOP, 5 );
	
	
	bSizer87->Add( 5, 0, 0, wxEXPAND, 5 );
	
	connIcon = new wxStaticBitmap( StatusInput, wxID_ANY, wxBitmap( wxT("Media/noConn.bmp"), wxBITMAP_TYPE_ANY ), wxDefaultPosition, wxSize( -1,-1 ), 0 );
	connIcon->SetToolTip( wxT("Connection type.") );
	
	bSizer87->Add( connIcon, 0, wxALIGN_CENTER, 5 );
	
	bSizer861->Add( bSizer87, 0, wxEXPAND, 5 );
	
	wxBoxSizer* bSizer88;
	bSizer88 = new wxBoxSizer( wxHORIZONTAL );
	
	m_staticText159 = new wxStaticText( StatusInput, wxID_ANY, wxT("Battery:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText159->Wrap( -1 );
	m_staticText159->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Calibri") ) );
	
	bSizer88->Add( m_staticText159, 0, wxLEFT|wxTOP, 5 );
	
	
	bSizer88->Add( 28, 0, 0, wxEXPAND, 5 );
	
	BatteryLevel = new wxStaticText( StatusInput, wxID_ANY, wxT("N.S."), wxDefaultPosition, wxDefaultSize, 0 );
	BatteryLevel->Wrap( -1 );
	BatteryLevel->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Calibri") ) );
	
	bSizer88->Add( BatteryLevel, 0, wxLEFT|wxTOP, 5 );
	
	
	bSizer88->Add( 10, 0, 0, wxEXPAND, 5 );
	
	Battery = new wxStaticBitmap( StatusInput, wxID_ANY, wxBitmap( wxT("Media/Battery/batterywrong.bmp"), wxBITMAP_TYPE_ANY ), wxDefaultPosition, wxDefaultSize, 0 );
	Battery->SetToolTip( wxT("Battery Level") );
	
	bSizer88->Add( Battery, 0, wxALIGN_CENTER_VERTICAL, 5 );
	
	bSizer861->Add( bSizer88, 0, wxEXPAND, 5 );
	
	
	bSizer861->Add( 0, 30, 0, wxEXPAND, 5 );
	
	wxBoxSizer* bSizer89;
	bSizer89 = new wxBoxSizer( wxHORIZONTAL );
	
	m_staticText116 = new wxStaticText( StatusInput, wxID_ANY, wxT("Connected to:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText116->Wrap( -1 );
	m_staticText116->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Calibri") ) );
	
	bSizer89->Add( m_staticText116, 0, wxLEFT, 5 );
	
	
	bSizer89->Add( 0, 0, 0, wxEXPAND, 5 );
	
	m_ClientName = new wxStaticText( StatusInput, wxID_ANY, wxT("NO Client Conn"), wxDefaultPosition, wxDefaultSize, 0 );
	m_ClientName->Wrap( -1 );
	m_ClientName->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Calibri") ) );
	
	bSizer89->Add( m_ClientName, 0, wxLEFT, 5 );
	
	bSizer861->Add( bSizer89, 0, wxEXPAND, 5 );
	
	StatusInput->SetSizer( bSizer861 );
	StatusInput->Layout();
	bSizer861->Fit( StatusInput );
	bSizer70->Add( StatusInput, 0, wxRIGHT|wxTOP, 5 );
	
	StatusProc = new wxPanel( Row3Big, wxID_ANY, wxDefaultPosition, wxSize( 110,100 ), wxTAB_TRAVERSAL );
	StatusProc->SetBackgroundColour( wxColour( 211, 211, 211 ) );
	
	wxFlexGridSizer* fgSizer34;
	fgSizer34 = new wxFlexGridSizer( 4, 2, 0, 5 );
	fgSizer34->SetFlexibleDirection( wxBOTH );
	fgSizer34->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
	
	fgSizer34->SetMinSize( wxSize( 200,100 ) ); 
	mElapsTimeLabel = new wxStaticText( StatusProc, wxID_ANY, wxT("Elapsed Time:"), wxDefaultPosition, wxDefaultSize, 0 );
	mElapsTimeLabel->Wrap( -1 );
	mElapsTimeLabel->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Calibri") ) );
	
	fgSizer34->Add( mElapsTimeLabel, 0, wxLEFT|wxTOP, 5 );
	
	m_ElapsedTime = new wxStaticText( StatusProc, wxID_ANY, wxT("0:0"), wxDefaultPosition, wxDefaultSize, 0 );
	m_ElapsedTime->Wrap( -1 );
	m_ElapsedTime->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Calibri") ) );
	
	fgSizer34->Add( m_ElapsedTime, 0, wxLEFT|wxTOP, 5 );
	
	m_SampFreqLabel = new wxStaticText( StatusProc, wxID_ANY, wxT("Sample Frequency: "), wxDefaultPosition, wxDefaultSize, 0 );
	m_SampFreqLabel->Wrap( -1 );
	m_SampFreqLabel->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Calibri") ) );
	
	fgSizer34->Add( m_SampFreqLabel, 0, wxLEFT|wxTOP, 5 );
	
	SampFreq = new wxStaticText( StatusProc, wxID_ANY, wxT("NA"), wxDefaultPosition, wxDefaultSize, 0 );
	SampFreq->Wrap( -1 );
	SampFreq->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Calibri") ) );
	
	fgSizer34->Add( SampFreq, 0, wxLEFT|wxTOP, 5 );
	
	m_NSample = new wxStaticText( StatusProc, wxID_ANY, wxT("Received Sample:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_NSample->Wrap( -1 );
	m_NSample->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Calibri") ) );
	
	fgSizer34->Add( m_NSample, 0, wxLEFT|wxTOP, 5 );
	
	nSample = new wxStaticText( StatusProc, wxID_ANY, wxT("0"), wxDefaultPosition, wxDefaultSize, 0 );
	nSample->Wrap( -1 );
	nSample->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Calibri") ) );
	
	fgSizer34->Add( nSample, 0, wxLEFT|wxTOP, 5 );
	
	m_errors = new wxStaticText( StatusProc, wxID_ANY, wxT("Errors:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_errors->Wrap( -1 );
	fgSizer34->Add( m_errors, 0, wxLEFT|wxTOP, 5 );
	
	nErrors = new wxStaticText( StatusProc, wxID_ANY, wxT("0"), wxDefaultPosition, wxDefaultSize, 0 );
	nErrors->Wrap( -1 );
	nErrors->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Calibri") ) );
	
	fgSizer34->Add( nErrors, 0, wxLEFT|wxTOP, 5 );
	
	StatusProc->SetSizer( fgSizer34 );
	StatusProc->Layout();
	bSizer70->Add( StatusProc, 0, wxRIGHT|wxTOP, 5 );
	
	StatusOutput = new wxPanel( Row3Big, wxID_ANY, wxDefaultPosition, wxSize( 110,100 ), wxTAB_TRAVERSAL );
	StatusOutput->SetBackgroundColour( wxColour( 211, 211, 211 ) );
	
	wxFlexGridSizer* fgSizer35;
	fgSizer35 = new wxFlexGridSizer( 1, 2, 0, 5 );
	fgSizer35->SetFlexibleDirection( wxBOTH );
	fgSizer35->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
	
	fgSizer35->SetMinSize( wxSize( 200,100 ) ); 
	wxBoxSizer* bSizer1061;
	bSizer1061 = new wxBoxSizer( wxVERTICAL );
	
	bSizer1061->SetMinSize( wxSize( 125,-1 ) ); 
	m_row1c1 = new wxStaticText( StatusOutput, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	m_row1c1->Wrap( -1 );
	m_row1c1->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Calibri") ) );
	
	bSizer1061->Add( m_row1c1, 0, wxLEFT|wxTOP, 5 );
	
	m_row2c1 = new wxStaticText( StatusOutput, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	m_row2c1->Wrap( -1 );
	m_row2c1->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Calibri") ) );
	
	bSizer1061->Add( m_row2c1, 0, wxLEFT|wxTOP, 5 );
	
	m_row3c1 = new wxStaticText( StatusOutput, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	m_row3c1->Wrap( -1 );
	m_row3c1->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Calibri") ) );
	
	bSizer1061->Add( m_row3c1, 0, wxLEFT|wxTOP, 5 );
	
	m_row4c1 = new wxStaticText( StatusOutput, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	m_row4c1->Wrap( -1 );
	m_row4c1->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Calibri") ) );
	
	bSizer1061->Add( m_row4c1, 0, wxLEFT|wxTOP, 5 );
	
	m_row5c1 = new wxStaticText( StatusOutput, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	m_row5c1->Wrap( -1 );
	m_row5c1->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Calibri") ) );
	
	bSizer1061->Add( m_row5c1, 0, wxLEFT|wxTOP, 5 );
	
	fgSizer35->Add( bSizer1061, 0, wxEXPAND, 0 );
	
	wxBoxSizer* bSizer107;
	bSizer107 = new wxBoxSizer( wxVERTICAL );
	
	bSizer107->SetMinSize( wxSize( 66,-1 ) ); 
	m_row1c2 = new wxStaticText( StatusOutput, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	m_row1c2->Wrap( -1 );
	m_row1c2->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Calibri") ) );
	
	bSizer107->Add( m_row1c2, 0, wxLEFT|wxTOP, 5 );
	
	m_row2c2 = new wxStaticText( StatusOutput, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	m_row2c2->Wrap( -1 );
	m_row2c2->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Calibri") ) );
	
	bSizer107->Add( m_row2c2, 0, wxLEFT|wxTOP, 5 );
	
	m_row3c2 = new wxStaticText( StatusOutput, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	m_row3c2->Wrap( -1 );
	m_row3c2->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Calibri") ) );
	
	bSizer107->Add( m_row3c2, 0, wxLEFT|wxTOP, 5 );
	
	m_row4c2 = new wxStaticText( StatusOutput, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	m_row4c2->Wrap( -1 );
	m_row4c2->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Calibri") ) );
	
	bSizer107->Add( m_row4c2, 0, wxLEFT|wxTOP, 5 );
	
	m_row5c2 = new wxStaticText( StatusOutput, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	m_row5c2->Wrap( -1 );
	m_row5c2->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Calibri") ) );
	
	bSizer107->Add( m_row5c2, 0, wxLEFT|wxTOP, 5 );
	
	fgSizer35->Add( bSizer107, 0, wxEXPAND, 0 );
	
	StatusOutput->SetSizer( fgSizer35 );
	StatusOutput->Layout();
	bSizer70->Add( StatusOutput, 0, wxRIGHT|wxTOP, 5 );
	
	Row3Big->SetSizer( bSizer70 );
	Row3Big->Layout();
	bSizer70->Fit( Row3Big );
	bSizer97->Add( Row3Big, 1, wxEXPAND, 5 );
	
	Row3Small = new wxPanel( Row3, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	Row3Small->Hide();
	
	wxBoxSizer* bSizer701;
	bSizer701 = new wxBoxSizer( wxHORIZONTAL );
	
	StatusClosed = new wxBitmapButton( Row3Small, wxIDStatus, wxBitmap( wxT("Media/interface buttons/Status_closed.bmp"), wxBITMAP_TYPE_ANY ), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|wxNO_BORDER );
	
	StatusClosed->SetBitmapSelected( wxBitmap( wxT("Media/interface buttons/Status_Pressed_Closed.bmp"), wxBITMAP_TYPE_ANY ) );
	StatusClosed->SetToolTip( wxT("Enlarge Status GUI") );
	
	StatusClosed->SetToolTip( wxT("Enlarge Status GUI") );
	
	bSizer701->Add( StatusClosed, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
	
	StatusInput1 = new wxPanel( Row3Small, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxTAB_TRAVERSAL );
	StatusInput1->SetBackgroundColour( wxColour( 211, 211, 211 ) );
	
	wxGridSizer* gSizer71;
	gSizer71 = new wxGridSizer( 2, 2, 0, 0 );
	
	gSizer71->SetMinSize( wxSize( 200,21 ) ); 
	mProc11 = new wxStaticText( StatusInput1, wxID_ANY, wxT("Connection:"), wxDefaultPosition, wxDefaultSize, 0 );
	mProc11->Wrap( -1 );
	mProc11->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Calibri") ) );
	
	gSizer71->Add( mProc11, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
	
	mProc12 = new wxStaticText( StatusInput1, wxID_ANY, wxT("Active"), wxDefaultPosition, wxDefaultSize, 0 );
	mProc12->Wrap( -1 );
	mProc12->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Calibri") ) );
	
	gSizer71->Add( mProc12, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
	
	StatusInput1->SetSizer( gSizer71 );
	StatusInput1->Layout();
	gSizer71->Fit( StatusInput1 );
	bSizer701->Add( StatusInput1, 0, wxRIGHT|wxTOP, 5 );
	
	StatusProc1 = new wxPanel( Row3Small, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxTAB_TRAVERSAL );
	StatusProc1->SetBackgroundColour( wxColour( 211, 211, 211 ) );
	
	wxFlexGridSizer* fgSizer15;
	fgSizer15 = new wxFlexGridSizer( 1, 2, 0, 5 );
	fgSizer15->SetFlexibleDirection( wxHORIZONTAL );
	fgSizer15->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
	
	fgSizer15->SetMinSize( wxSize( 200,21 ) ); 
	wxBoxSizer* bSizer108;
	bSizer108 = new wxBoxSizer( wxVERTICAL );
	
	bSizer108->SetMinSize( wxSize( 125,-1 ) ); 
	mProc21 = new wxStaticText( StatusProc1, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	mProc21->Wrap( -1 );
	mProc21->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Calibri") ) );
	
	bSizer108->Add( mProc21, 1, wxLEFT|wxRIGHT, 5 );
	
	fgSizer15->Add( bSizer108, 0, wxEXPAND|wxTOP, 3 );
	
	wxBoxSizer* bSizer109;
	bSizer109 = new wxBoxSizer( wxVERTICAL );
	
	bSizer109->SetMinSize( wxSize( 65,-1 ) ); 
	mProc22 = new wxStaticText( StatusProc1, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	mProc22->Wrap( -1 );
	mProc22->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Calibri") ) );
	
	bSizer109->Add( mProc22, 0, wxEXPAND|wxLEFT|wxRIGHT, 5 );
	
	fgSizer15->Add( bSizer109, 1, wxEXPAND|wxTOP, 3 );
	
	StatusProc1->SetSizer( fgSizer15 );
	StatusProc1->Layout();
	fgSizer15->Fit( StatusProc1 );
	bSizer701->Add( StatusProc1, 0, wxRIGHT|wxTOP, 5 );
	
	StatusOutput1 = new wxPanel( Row3Small, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxTAB_TRAVERSAL );
	StatusOutput1->SetBackgroundColour( wxColour( 211, 211, 211 ) );
	
	wxFlexGridSizer* fgSizer17;
	fgSizer17 = new wxFlexGridSizer( 1, 2, 0, 5 );
	fgSizer17->SetFlexibleDirection( wxBOTH );
	fgSizer17->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
	
	fgSizer17->SetMinSize( wxSize( 200,22 ) ); 
	wxBoxSizer* bSizer110;
	bSizer110 = new wxBoxSizer( wxVERTICAL );
	
	bSizer110->SetMinSize( wxSize( 125,-1 ) ); 
	mProc31 = new wxStaticText( StatusOutput1, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	mProc31->Wrap( -1 );
	mProc31->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Calibri") ) );
	
	bSizer110->Add( mProc31, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 3 );
	
	fgSizer17->Add( bSizer110, 1, wxEXPAND|wxTOP, 3 );
	
	wxBoxSizer* bSizer111;
	bSizer111 = new wxBoxSizer( wxVERTICAL );
	
	bSizer111->SetMinSize( wxSize( 65,-1 ) ); 
	mProc32 = new wxStaticText( StatusOutput1, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	mProc32->Wrap( -1 );
	mProc32->SetFont( wxFont( 10, 74, 90, 92, false, wxT("Calibri") ) );
	
	bSizer111->Add( mProc32, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
	
	fgSizer17->Add( bSizer111, 1, wxEXPAND|wxTOP, 3 );
	
	StatusOutput1->SetSizer( fgSizer17 );
	StatusOutput1->Layout();
	fgSizer17->Fit( StatusOutput1 );
	bSizer701->Add( StatusOutput1, 0, wxRIGHT|wxTOP, 5 );
	
	Row3Small->SetSizer( bSizer701 );
	Row3Small->Layout();
	bSizer701->Fit( Row3Small );
	bSizer97->Add( Row3Small, 1, wxEXPAND, 5 );
	
	Row3->SetSizer( bSizer97 );
	Row3->Layout();
	bSizer97->Fit( Row3 );
	MainSizer->Add( Row3, 1, wxEXPAND, 5 );
	
	Row4 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	wxBoxSizer* bSizer71;
	bSizer71 = new wxBoxSizer( wxHORIZONTAL );
	
	Row4Big = new wxPanel( Row4, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	wxBoxSizer* bSizer99;
	bSizer99 = new wxBoxSizer( wxHORIZONTAL );
	
	LogOpened = new wxBitmapButton( Row4Big, wxIDLog, wxBitmap( wxT("Media/interface buttons/Log_opened.bmp"), wxBITMAP_TYPE_ANY ), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|wxNO_BORDER );
	
	LogOpened->SetBitmapSelected( wxBitmap( wxT("Media/interface buttons/Log_pressed_opened.bmp"), wxBITMAP_TYPE_ANY ) );
	LogOpened->SetToolTip( wxT("Reduce Log GUI") );
	
	LogOpened->SetToolTip( wxT("Reduce Log GUI") );
	
	bSizer99->Add( LogOpened, 0, wxALL, 5 );
	
	m_TextOut = new wxTextCtrl( Row4Big, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,100 ), wxTE_MULTILINE|wxTE_READONLY );
	bSizer99->Add( m_TextOut, 1, wxBOTTOM|wxEXPAND|wxRIGHT|wxTOP, 5 );
	
	Row4Big->SetSizer( bSizer99 );
	Row4Big->Layout();
	bSizer99->Fit( Row4Big );
	bSizer71->Add( Row4Big, 1, wxEXPAND, 5 );
	
	Row4Small = new wxPanel( Row4, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	Row4Small->Hide();
	
	wxBoxSizer* bSizer991;
	bSizer991 = new wxBoxSizer( wxHORIZONTAL );
	
	mLogClosed = new wxBitmapButton( Row4Small, wxIDLog, wxBitmap( wxT("Media/interface buttons/Log_closed.bmp"), wxBITMAP_TYPE_ANY ), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|wxNO_BORDER );
	
	mLogClosed->SetBitmapSelected( wxBitmap( wxT("Media/interface buttons/Log_pressed_closed.bmp"), wxBITMAP_TYPE_ANY ) );
	mLogClosed->SetToolTip( wxT("Enlarge log GUI") );
	
	mLogClosed->SetToolTip( wxT("Enlarge log GUI") );
	
	bSizer991->Add( mLogClosed, 0, wxALL, 5 );
	
	m_TextOut2 = new wxTextCtrl( Row4Small, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,21 ), wxTE_NO_VSCROLL|wxTE_READONLY );
	bSizer991->Add( m_TextOut2, 1, wxBOTTOM|wxRIGHT|wxTOP, 5 );
	
	Row4Small->SetSizer( bSizer991 );
	Row4Small->Layout();
	bSizer991->Fit( Row4Small );
	bSizer71->Add( Row4Small, 1, wxEXPAND, 5 );
	
	Row4->SetSizer( bSizer71 );
	Row4->Layout();
	bSizer71->Fit( Row4 );
	MainSizer->Add( Row4, 1, wxEXPAND, 5 );
	
	this->SetSizer( MainSizer );
	this->Layout();
	MainSizer->Fit( this );
}

MainPanel::~MainPanel()
{
}

ViewConfig::ViewConfig( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxDefaultSize, wxDefaultSize );
	
	wxBoxSizer* bSizer14;
	bSizer14 = new wxBoxSizer( wxVERTICAL );
	
	wxString m_GainChoices[] = { wxT("x1"), wxT("x5"), wxT("x10"), wxT("x50"), wxT("x100") };
	int m_GainNChoices = sizeof( m_GainChoices ) / sizeof( wxString );
	m_Gain = new wxRadioBox( this, wxID_ANY, wxT("Gain"), wxDefaultPosition, wxDefaultSize, m_GainNChoices, m_GainChoices, 1, wxRA_SPECIFY_ROWS );
	m_Gain->SetSelection( 2 );
	bSizer14->Add( m_Gain, 0, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 );
	
	wxBoxSizer* bSizer15;
	bSizer15 = new wxBoxSizer( wxHORIZONTAL );
	
	wxString m_DetrendChoices[] = { wxT("On"), wxT("Off") };
	int m_DetrendNChoices = sizeof( m_DetrendChoices ) / sizeof( wxString );
	m_Detrend = new wxRadioBox( this, wxID_ANY, wxT("Detrend"), wxDefaultPosition, wxDefaultSize, m_DetrendNChoices, m_DetrendChoices, 1, wxRA_SPECIFY_COLS );
	m_Detrend->SetSelection( 0 );
	bSizer15->Add( m_Detrend, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
	
	wxString m_VisibleChoices[] = { wxT("Yes"), wxT("No") };
	int m_VisibleNChoices = sizeof( m_VisibleChoices ) / sizeof( wxString );
	m_Visible = new wxRadioBox( this, wxID_ANY, wxT("Visible"), wxDefaultPosition, wxDefaultSize, m_VisibleNChoices, m_VisibleChoices, 1, wxRA_SPECIFY_COLS );
	m_Visible->SetSelection( 0 );
	bSizer15->Add( m_Visible, 1, wxALL|wxEXPAND, 5 );
	
	bSizer14->Add( bSizer15, 0, wxEXPAND, 5 );
	
	wxStaticBoxSizer* sbSizer11;
	sbSizer11 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxT("Colour") ), wxHORIZONTAL );
	
	m_Colour = new wxColourPickerCtrl( this, wxID_ANY, *wxBLACK, wxDefaultPosition, wxDefaultSize, wxCLRP_DEFAULT_STYLE|wxCLRP_SHOW_LABEL|wxCLRP_USE_TEXTCTRL );
	sbSizer11->Add( m_Colour, 1, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
	
	bSizer14->Add( sbSizer11, 0, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 );
	
	wxBoxSizer* bSizer16;
	bSizer16 = new wxBoxSizer( wxHORIZONTAL );
	
	
	bSizer16->Add( 0, 0, 1, wxEXPAND, 5 );
	
	m_button3 = new wxButton( this, wxID_ANY, wxT("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer16->Add( m_button3, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
	
	
	bSizer16->Add( 0, 0, 1, wxEXPAND, 5 );
	
	m_button4 = new wxButton( this, wxID_ANY, wxT("Save"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer16->Add( m_button4, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
	
	m_button31 = new wxButton( this, wxID_ANY, wxT("Apply"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer16->Add( m_button31, 0, wxALL, 5 );
	
	
	bSizer16->Add( 0, 0, 1, wxEXPAND, 5 );
	
	bSizer14->Add( bSizer16, 0, wxALL|wxEXPAND, 5 );
	
	this->SetSizer( bSizer14 );
	this->Layout();
	bSizer14->Fit( this );
	
	// Connect Events
	m_button3->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ViewConfig::OnCancel ), NULL, this );
	m_button4->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ViewConfig::OnSave ), NULL, this );
	m_button31->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ViewConfig::OnApply ), NULL, this );
}

ViewConfig::~ViewConfig()
{
	// Disconnect Events
	m_button3->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ViewConfig::OnCancel ), NULL, this );
	m_button4->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ViewConfig::OnSave ), NULL, this );
	m_button31->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ViewConfig::OnApply ), NULL, this );
}

EmotivConfig::EmotivConfig( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxDefaultSize, wxDefaultSize );
	
	wxBoxSizer* bSizer128;
	bSizer128 = new wxBoxSizer( wxVERTICAL );
	
	m_staticText180 = new wxStaticText( this, wxID_ANY, wxT("Check to Enable button"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText180->Wrap( -1 );
	m_staticText180->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
	
	bSizer128->Add( m_staticText180, 0, wxALIGN_CENTER|wxALL, 5 );
	
	wxBoxSizer* bSizer143;
	bSizer143 = new wxBoxSizer( wxHORIZONTAL );
	
	wxBoxSizer* bSizer144;
	bSizer144 = new wxBoxSizer( wxVERTICAL );
	
	AF3 = new wxCheckBox( this, idAF3, wxT("AF3"), wxDefaultPosition, wxDefaultSize, 0 );
	
	bSizer144->Add( AF3, 0, wxALL, 5 );
	
	F3 = new wxCheckBox( this, idF3, wxT("F3"), wxDefaultPosition, wxDefaultSize, 0 );
	F3->SetValue(true);
	
	bSizer144->Add( F3, 0, wxALL, 5 );
	
	F7 = new wxCheckBox( this, idF7, wxT("F7"), wxDefaultPosition, wxDefaultSize, 0 );
	
	bSizer144->Add( F7, 0, wxALL, 5 );
	
	FC5 = new wxCheckBox( this, idFC5, wxT("FC5"), wxDefaultPosition, wxDefaultSize, 0 );
	
	bSizer144->Add( FC5, 0, wxALL, 5 );
	
	P7 = new wxCheckBox( this, idP7, wxT("P7"), wxDefaultPosition, wxDefaultSize, 0 );
	P7->SetValue(true);
	
	bSizer144->Add( P7, 0, wxALL, 5 );
	
	T7 = new wxCheckBox( this, idT7, wxT("T7"), wxDefaultPosition, wxDefaultSize, 0 );
	T7->SetValue(true);
	
	bSizer144->Add( T7, 0, wxALL, 5 );
	
	O1 = new wxCheckBox( this, idO1, wxT("O1"), wxDefaultPosition, wxDefaultSize, 0 );
	O1->SetValue(true);
	
	bSizer144->Add( O1, 0, wxALL, 5 );
	
	GyroX = new wxCheckBox( this, idGyroX, wxT("GyroX"), wxDefaultPosition, wxDefaultSize, 0 );
	
	bSizer144->Add( GyroX, 0, wxALL, 5 );
	
	bSizer143->Add( bSizer144, 1, wxEXPAND, 5 );
	
	wxBoxSizer* bSizer1441;
	bSizer1441 = new wxBoxSizer( wxVERTICAL );
	
	AF4 = new wxCheckBox( this, idAF4, wxT("AF4"), wxDefaultPosition, wxDefaultSize, 0 );
	
	bSizer1441->Add( AF4, 0, wxALL, 5 );
	
	F4 = new wxCheckBox( this, idF4, wxT("F4"), wxDefaultPosition, wxDefaultSize, 0 );
	F4->SetValue(true);
	
	bSizer1441->Add( F4, 0, wxALL, 5 );
	
	F8 = new wxCheckBox( this, idF8, wxT("F8"), wxDefaultPosition, wxDefaultSize, 0 );
	
	bSizer1441->Add( F8, 0, wxALL, 5 );
	
	FC6 = new wxCheckBox( this, idFC6, wxT("FC6"), wxDefaultPosition, wxDefaultSize, 0 );
	
	bSizer1441->Add( FC6, 0, wxALL, 5 );
	
	P8 = new wxCheckBox( this, idP8, wxT("P8"), wxDefaultPosition, wxDefaultSize, 0 );
	P8->SetValue(true);
	
	bSizer1441->Add( P8, 0, wxALL, 5 );
	
	T8 = new wxCheckBox( this, idT8, wxT("T8"), wxDefaultPosition, wxDefaultSize, 0 );
	T8->SetValue(true);
	
	bSizer1441->Add( T8, 0, wxALL, 5 );
	
	O2 = new wxCheckBox( this, idO2, wxT("O2"), wxDefaultPosition, wxDefaultSize, 0 );
	O2->SetValue(true);
	
	bSizer1441->Add( O2, 0, wxALL, 5 );
	
	GyroY = new wxCheckBox( this, idGyroY, wxT("GyroY"), wxDefaultPosition, wxDefaultSize, 0 );
	
	bSizer1441->Add( GyroY, 0, wxALL, 5 );
	
	bSizer143->Add( bSizer1441, 1, wxEXPAND, 5 );
	
	bSizer128->Add( bSizer143, 1, wxEXPAND, 5 );
	
	wxBoxSizer* bSizer148;
	bSizer148 = new wxBoxSizer( wxHORIZONTAL );
	
	m_button21 = new wxButton( this, wxCancel, wxT("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer148->Add( m_button21, 0, wxALL, 5 );
	
	m_button22 = new wxButton( this, wxOk, wxT("Ok"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer148->Add( m_button22, 0, wxALL, 5 );
	
	bSizer128->Add( bSizer148, 0, 0, 5 );
	
	this->SetSizer( bSizer128 );
	this->Layout();
	bSizer128->Fit( this );
}

EmotivConfig::~EmotivConfig()
{
}

ImpedanceCheck::ImpedanceCheck( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxDefaultSize, wxDefaultSize );
	this->SetExtraStyle( wxFRAME_EX_CONTEXTHELP );
	
	wxBoxSizer* bSizer67;
	bSizer67 = new wxBoxSizer( wxVERTICAL );
	
	m_panel6 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	wxBoxSizer* bSizer69;
	bSizer69 = new wxBoxSizer( wxVERTICAL );
	
	wxGridBagSizer* gbSizer6;
	gbSizer6 = new wxGridBagSizer( 0, 0 );
	gbSizer6->SetFlexibleDirection( wxBOTH );
	gbSizer6->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
	
	m_bitmap7 = new wxStaticBitmap( m_panel6, wxID_ANY, wxBitmap( wxT("Media/ElectrodePositions1020.PNG"), wxBITMAP_TYPE_ANY ), wxDefaultPosition, wxDefaultSize, 0 );
	gbSizer6->Add( m_bitmap7, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALL|wxEXPAND, 0 );
	
	bSizer69->Add( gbSizer6, 1, wxALL|wxEXPAND, 0 );
	
	m_panel6->SetSizer( bSizer69 );
	m_panel6->Layout();
	bSizer69->Fit( m_panel6 );
	bSizer67->Add( m_panel6, 1, wxEXPAND | wxALL, 0 );
	
	this->SetSizer( bSizer67 );
	this->Layout();
	bSizer67->Fit( this );
	
	this->Centre( wxBOTH );
}

ImpedanceCheck::~ImpedanceCheck()
{
}

FilePlayFrame::FilePlayFrame( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxDefaultSize, wxDefaultSize );
	
	wxBoxSizer* bSizer9;
	bSizer9 = new wxBoxSizer( wxVERTICAL );
	
	m_panel1 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	m_panel1->SetBackgroundColour( wxColour( 255, 255, 255 ) );
	
	wxGridSizer* gSizer1;
	gSizer1 = new wxGridSizer( 3, 3, 0, 0 );
	
	
	gSizer1->Add( 0, 0, 0, 0, 0 );
	
	m_bpButton19 = new wxBitmapButton( m_panel1, wxID_UP, wxBitmap( wxT("Media/UP.bmp"), wxBITMAP_TYPE_ANY ), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|wxNO_BORDER|wxSTATIC_BORDER );
	gSizer1->Add( m_bpButton19, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 10 );
	
	
	gSizer1->Add( 0, 0, 0, 0, 0 );
	
	m_bpButton20 = new wxBitmapButton( m_panel1, wxID_LEFT, wxBitmap( wxT("Media/LEFT.bmp"), wxBITMAP_TYPE_ANY ), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|wxNO_BORDER );
	gSizer1->Add( m_bpButton20, 0, wxALIGN_CENTER, 10 );
	
	m_bpButton21 = new wxBitmapButton( m_panel1, wxID_CENTER, wxBitmap( wxT("Media/plot buttons/stop.bmp"), wxBITMAP_TYPE_ANY ), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW );
	
	m_bpButton21->SetBitmapDisabled( wxBitmap( wxT("Media/plot buttons/stop inactive.bmp"), wxBITMAP_TYPE_ANY ) );
	m_bpButton21->SetBitmapSelected( wxBitmap( wxT("Media/plot buttons/stop pressed.bmp"), wxBITMAP_TYPE_ANY ) );
	gSizer1->Add( m_bpButton21, 0, wxALIGN_CENTER, 10 );
	
	m_bpButton22 = new wxBitmapButton( m_panel1, wxID_RIGHT, wxBitmap( wxT("Media/RIGHT.bmp"), wxBITMAP_TYPE_ANY ), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|wxNO_BORDER );
	gSizer1->Add( m_bpButton22, 0, wxALIGN_CENTER, 10 );
	
	
	gSizer1->Add( 0, 0, 0, 0, 0 );
	
	m_bpButton23 = new wxBitmapButton( m_panel1, wxID_DOWN, wxBitmap( wxT("Media/DOWN.bmp"), wxBITMAP_TYPE_ANY ), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|wxNO_BORDER );
	gSizer1->Add( m_bpButton23, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 10 );
	
	m_panel1->SetSizer( gSizer1 );
	m_panel1->Layout();
	gSizer1->Fit( m_panel1 );
	bSizer9->Add( m_panel1, 0, wxEXPAND | wxALL, 0 );
	
	this->SetSizer( bSizer9 );
	this->Layout();
	bSizer9->Fit( this );
}

FilePlayFrame::~FilePlayFrame()
{
}

VAmpDialog::VAmpDialog( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxDefaultSize, wxDefaultSize );
	
	wxBoxSizer* bSizer66;
	bSizer66 = new wxBoxSizer( wxVERTICAL );
	
	m_panel4 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	wxFlexGridSizer* fgSizer2;
	fgSizer2 = new wxFlexGridSizer( 4, 1, 0, 0 );
	fgSizer2->SetFlexibleDirection( wxVERTICAL );
	fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
	
	wxBoxSizer* bSizer46;
	bSizer46 = new wxBoxSizer( wxVERTICAL );
	
	m_staticText36 = new wxStaticText( m_panel4, wxID_ANY, wxT("Select the acquisition mode and the enabled channels"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText36->Wrap( -1 );
	m_staticText36->SetFont( wxFont( 13, 74, 90, 92, false, wxEmptyString ) );
	
	bSizer46->Add( m_staticText36, 0, wxALIGN_CENTER|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
	
	fgSizer2->Add( bSizer46, 0, wxEXPAND, 5 );
	
	wxBoxSizer* bSizer128;
	bSizer128 = new wxBoxSizer( wxHORIZONTAL );
	
	wxBoxSizer* bSizer127;
	bSizer127 = new wxBoxSizer( wxVERTICAL );
	
	
	bSizer127->Add( 0, 25, 0, wxEXPAND, 5 );
	
	m_staticText37 = new wxStaticText( m_panel4, wxID_ANY, wxT("Please select the acquisition mode:\n- Normal mode (8 or 16 EEG Channels and 2 Aux\n  Channels at 2KHz)\n- Fast Mode (4 Channels at 20KHz)"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText37->Wrap( -1 );
	m_staticText37->SetBackgroundColour( wxColour( 255, 255, 255 ) );
	m_staticText37->SetMinSize( wxSize( -1,60 ) );
	
	bSizer127->Add( m_staticText37, 0, wxALL|wxEXPAND, 5 );
	
	
	bSizer127->Add( 0, 10, 0, wxEXPAND, 5 );
	
	wxBoxSizer* bSizer47;
	bSizer47 = new wxBoxSizer( wxHORIZONTAL );
	
	m_staticText38 = new wxStaticText( m_panel4, wxID_ANY, wxT("Acquisition Mode"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText38->Wrap( -1 );
	m_staticText38->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
	
	bSizer47->Add( m_staticText38, 0, wxALL|wxEXPAND, 5 );
	
	
	bSizer47->Add( 0, 0, 1, wxEXPAND, 5 );
	
	wxString AcqModeChoices[] = { wxT("Normal Mode (2KHz)"), wxT("Fast Mode (20Khz)") };
	int AcqModeNChoices = sizeof( AcqModeChoices ) / sizeof( wxString );
	AcqMode = new wxChoice( m_panel4, wxID_FREQ, wxDefaultPosition, wxDefaultSize, AcqModeNChoices, AcqModeChoices, 0 );
	AcqMode->SetSelection( 0 );
	AcqMode->Enable( false );
	
	bSizer47->Add( AcqMode, 0, wxALL|wxEXPAND, 5 );
	
	bSizer127->Add( bSizer47, 0, wxALIGN_CENTER|wxEXPAND, 5 );
	
	
	bSizer127->Add( 0, 10, 0, wxEXPAND, 5 );
	
	m_staticText371 = new wxStaticText( m_panel4, wxID_ANY, wxT("Please select the channels that you would like to \nbe registered and select or add an appropriate \nname. You can also choose from pre-selected\nconfigurations."), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText371->Wrap( -1 );
	m_staticText371->SetBackgroundColour( wxColour( 255, 255, 255 ) );
	
	bSizer127->Add( m_staticText371, 0, wxALL, 5 );
	
	
	bSizer127->Add( 0, 10, 0, wxEXPAND, 5 );
	
	wxBoxSizer* bSizer67;
	bSizer67 = new wxBoxSizer( wxHORIZONTAL );
	
	Pre = new wxStaticText( m_panel4, wxID_ANY, wxT("Pre-selected conf."), wxDefaultPosition, wxDefaultSize, 0 );
	Pre->Wrap( -1 );
	Pre->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
	
	bSizer67->Add( Pre, 0, wxALL|wxEXPAND, 5 );
	
	preset = new wxComboBox( m_panel4, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); 
	bSizer67->Add( preset, 0, wxALL|wxEXPAND, 5 );
	
	bSizer127->Add( bSizer67, 1, wxEXPAND, 5 );
	
	m_staticText215 = new wxStaticText( m_panel4, wxID_ANY, wxT("Select Channels:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText215->Wrap( -1 );
	m_staticText215->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
	
	bSizer127->Add( m_staticText215, 0, wxALL, 5 );
	
	bSizer128->Add( bSizer127, 1, 0, 5 );
	
	wxBoxSizer* bSizer65;
	bSizer65 = new wxBoxSizer( wxVERTICAL );
	
	m_bitmap3 = new wxStaticBitmap( m_panel4, wxID_ANY, wxBitmap( wxT("Media/10_20System.bmp"), wxBITMAP_TYPE_ANY ), wxDefaultPosition, wxSize( -1,-1 ), 0 );
	bSizer65->Add( m_bitmap3, 1, wxALIGN_CENTER|wxALL|wxEXPAND, 5 );
	
	bSizer128->Add( bSizer65, 1, wxEXPAND, 5 );
	
	fgSizer2->Add( bSizer128, 1, wxEXPAND, 5 );
	
	wxBoxSizer* bSizer130;
	bSizer130 = new wxBoxSizer( wxHORIZONTAL );
	
	wxBoxSizer* bSizer129;
	bSizer129 = new wxBoxSizer( wxVERTICAL );
	
	wxBoxSizer* bSizer231117;
	bSizer231117 = new wxBoxSizer( wxHORIZONTAL );
	
	Lab1 = new wxStaticText( m_panel4, wxID_ANY, wxT("Ch 1"), wxDefaultPosition, wxDefaultSize, 0 );
	Lab1->Wrap( -1 );
	bSizer231117->Add( Lab1, 0, wxALL|wxEXPAND, 5 );
	
	
	bSizer231117->Add( 18, 0, 0, wxEXPAND, 5 );
	
	EnableCh1 = new wxCheckBox( m_panel4, wxID_EN, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	EnableCh1->SetValue(true);
	
	bSizer231117->Add( EnableCh1, 0, wxALL, 5 );
	
	
	bSizer231117->Add( 30, 0, 0, wxEXPAND, 5 );
	
	NameCh1 = new wxComboBox( m_panel4, wxID_ANY, wxT("CH1"), wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
	NameCh1->Append( wxT("O1") );
	NameCh1->Append( wxT("OZ") );
	NameCh1->Append( wxT("O2") );
	NameCh1->Append( wxT("T5") );
	NameCh1->Append( wxT("P5") );
	NameCh1->Append( wxT("P3") );
	NameCh1->Append( wxT("P1") );
	NameCh1->Append( wxT("PZ") );
	NameCh1->Append( wxT("P2") );
	NameCh1->Append( wxT("P4") );
	NameCh1->Append( wxT("P6") );
	NameCh1->Append( wxT("T6") );
	NameCh1->Append( wxT("T3") );
	NameCh1->Append( wxT("C5") );
	NameCh1->Append( wxT("C3") );
	NameCh1->Append( wxT("C1") );
	NameCh1->Append( wxT("CZ") );
	NameCh1->Append( wxT("C2") );
	NameCh1->Append( wxT("C4") );
	NameCh1->Append( wxT("C6") );
	NameCh1->Append( wxT("T4") );
	NameCh1->Append( wxT("FZ") );
	NameCh1->Append( wxT("F5") );
	NameCh1->Append( wxT("F3") );
	NameCh1->Append( wxT("FZ") );
	NameCh1->Append( wxT("F2") );
	NameCh1->Append( wxT("F4") );
	NameCh1->Append( wxT("F6") );
	NameCh1->Append( wxT("F8") );
	NameCh1->Append( wxT("FP1") );
	NameCh1->Append( wxT("FPZ") );
	NameCh1->Append( wxT("FP2") );
	bSizer231117->Add( NameCh1, 1, wxALL, 5 );
	
	bSizer129->Add( bSizer231117, 1, wxEXPAND, 5 );
	
	wxBoxSizer* bSizer2311171;
	bSizer2311171 = new wxBoxSizer( wxHORIZONTAL );
	
	Lab2 = new wxStaticText( m_panel4, wxID_ANY, wxT("Ch 2"), wxDefaultPosition, wxDefaultSize, 0 );
	Lab2->Wrap( -1 );
	bSizer2311171->Add( Lab2, 0, wxALL|wxEXPAND, 5 );
	
	
	bSizer2311171->Add( 18, 0, 0, wxEXPAND, 5 );
	
	EnableCh2 = new wxCheckBox( m_panel4, wxID_EN, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	EnableCh2->SetValue(true);
	
	bSizer2311171->Add( EnableCh2, 0, wxALL, 5 );
	
	
	bSizer2311171->Add( 30, 0, 0, wxEXPAND, 5 );
	
	NameCh2 = new wxComboBox( m_panel4, wxID_ANY, wxT("CH2"), wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
	NameCh2->Append( wxT("O1") );
	NameCh2->Append( wxT("OZ") );
	NameCh2->Append( wxT("O2") );
	NameCh2->Append( wxT("T5") );
	NameCh2->Append( wxT("P5") );
	NameCh2->Append( wxT("P3") );
	NameCh2->Append( wxT("P1") );
	NameCh2->Append( wxT("PZ") );
	NameCh2->Append( wxT("P2") );
	NameCh2->Append( wxT("P4") );
	NameCh2->Append( wxT("P6") );
	NameCh2->Append( wxT("T6") );
	NameCh2->Append( wxT("T3") );
	NameCh2->Append( wxT("C5") );
	NameCh2->Append( wxT("C3") );
	NameCh2->Append( wxT("C1") );
	NameCh2->Append( wxT("CZ") );
	NameCh2->Append( wxT("C2") );
	NameCh2->Append( wxT("C4") );
	NameCh2->Append( wxT("C6") );
	NameCh2->Append( wxT("T4") );
	NameCh2->Append( wxT("FZ") );
	NameCh2->Append( wxT("F5") );
	NameCh2->Append( wxT("F3") );
	NameCh2->Append( wxT("FZ") );
	NameCh2->Append( wxT("F2") );
	NameCh2->Append( wxT("F4") );
	NameCh2->Append( wxT("F6") );
	NameCh2->Append( wxT("F8") );
	NameCh2->Append( wxT("FP1") );
	NameCh2->Append( wxT("FPZ") );
	NameCh2->Append( wxT("FP2") );
	bSizer2311171->Add( NameCh2, 1, wxALL, 5 );
	
	bSizer129->Add( bSizer2311171, 1, wxEXPAND, 5 );
	
	wxBoxSizer* bSizer23111711;
	bSizer23111711 = new wxBoxSizer( wxHORIZONTAL );
	
	Lab3 = new wxStaticText( m_panel4, wxID_ANY, wxT("Ch 3"), wxDefaultPosition, wxDefaultSize, 0 );
	Lab3->Wrap( -1 );
	bSizer23111711->Add( Lab3, 0, wxALL|wxEXPAND, 5 );
	
	
	bSizer23111711->Add( 18, 0, 0, wxEXPAND, 5 );
	
	EnableCh3 = new wxCheckBox( m_panel4, wxID_EN, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	EnableCh3->SetValue(true);
	
	bSizer23111711->Add( EnableCh3, 0, wxALL, 5 );
	
	
	bSizer23111711->Add( 30, 0, 0, wxEXPAND, 5 );
	
	NameCh3 = new wxComboBox( m_panel4, wxID_ANY, wxT("CH3"), wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
	NameCh3->Append( wxT("O1") );
	NameCh3->Append( wxT("OZ") );
	NameCh3->Append( wxT("O2") );
	NameCh3->Append( wxT("T5") );
	NameCh3->Append( wxT("P5") );
	NameCh3->Append( wxT("P3") );
	NameCh3->Append( wxT("P1") );
	NameCh3->Append( wxT("PZ") );
	NameCh3->Append( wxT("P2") );
	NameCh3->Append( wxT("P4") );
	NameCh3->Append( wxT("P6") );
	NameCh3->Append( wxT("T6") );
	NameCh3->Append( wxT("T3") );
	NameCh3->Append( wxT("C5") );
	NameCh3->Append( wxT("C3") );
	NameCh3->Append( wxT("C1") );
	NameCh3->Append( wxT("CZ") );
	NameCh3->Append( wxT("C2") );
	NameCh3->Append( wxT("C4") );
	NameCh3->Append( wxT("C6") );
	NameCh3->Append( wxT("T4") );
	NameCh3->Append( wxT("FZ") );
	NameCh3->Append( wxT("F5") );
	NameCh3->Append( wxT("F3") );
	NameCh3->Append( wxT("FZ") );
	NameCh3->Append( wxT("F2") );
	NameCh3->Append( wxT("F4") );
	NameCh3->Append( wxT("F6") );
	NameCh3->Append( wxT("F8") );
	NameCh3->Append( wxT("FP1") );
	NameCh3->Append( wxT("FPZ") );
	NameCh3->Append( wxT("FP2") );
	bSizer23111711->Add( NameCh3, 1, wxALL, 5 );
	
	bSizer129->Add( bSizer23111711, 1, wxEXPAND, 5 );
	
	wxBoxSizer* bSizer2311172;
	bSizer2311172 = new wxBoxSizer( wxHORIZONTAL );
	
	Lab4 = new wxStaticText( m_panel4, wxID_ANY, wxT("Ch 4"), wxDefaultPosition, wxDefaultSize, 0 );
	Lab4->Wrap( -1 );
	bSizer2311172->Add( Lab4, 0, wxALL|wxEXPAND, 5 );
	
	
	bSizer2311172->Add( 18, 0, 0, wxEXPAND, 5 );
	
	EnableCh4 = new wxCheckBox( m_panel4, wxID_EN, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	EnableCh4->SetValue(true);
	
	bSizer2311172->Add( EnableCh4, 0, wxALL, 5 );
	
	
	bSizer2311172->Add( 30, 0, 0, wxEXPAND, 5 );
	
	NameCh4 = new wxComboBox( m_panel4, wxID_ANY, wxT("CH4"), wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
	NameCh4->Append( wxT("O1") );
	NameCh4->Append( wxT("OZ") );
	NameCh4->Append( wxT("O2") );
	NameCh4->Append( wxT("T5") );
	NameCh4->Append( wxT("P5") );
	NameCh4->Append( wxT("P3") );
	NameCh4->Append( wxT("P1") );
	NameCh4->Append( wxT("PZ") );
	NameCh4->Append( wxT("P2") );
	NameCh4->Append( wxT("P4") );
	NameCh4->Append( wxT("P6") );
	NameCh4->Append( wxT("T6") );
	NameCh4->Append( wxT("T3") );
	NameCh4->Append( wxT("C5") );
	NameCh4->Append( wxT("C3") );
	NameCh4->Append( wxT("C1") );
	NameCh4->Append( wxT("CZ") );
	NameCh4->Append( wxT("C2") );
	NameCh4->Append( wxT("C4") );
	NameCh4->Append( wxT("C6") );
	NameCh4->Append( wxT("T4") );
	NameCh4->Append( wxT("FZ") );
	NameCh4->Append( wxT("F5") );
	NameCh4->Append( wxT("F3") );
	NameCh4->Append( wxT("FZ") );
	NameCh4->Append( wxT("F2") );
	NameCh4->Append( wxT("F4") );
	NameCh4->Append( wxT("F6") );
	NameCh4->Append( wxT("F8") );
	NameCh4->Append( wxT("FP1") );
	NameCh4->Append( wxT("FPZ") );
	NameCh4->Append( wxT("FP2") );
	bSizer2311172->Add( NameCh4, 1, wxALL, 5 );
	
	bSizer129->Add( bSizer2311172, 1, wxEXPAND, 5 );
	
	wxBoxSizer* bSizer2311173;
	bSizer2311173 = new wxBoxSizer( wxHORIZONTAL );
	
	Lab5 = new wxStaticText( m_panel4, wxID_ANY, wxT("Ch 5"), wxDefaultPosition, wxDefaultSize, 0 );
	Lab5->Wrap( -1 );
	bSizer2311173->Add( Lab5, 0, wxALL|wxEXPAND, 5 );
	
	
	bSizer2311173->Add( 18, 0, 0, wxEXPAND, 5 );
	
	EnableCh5 = new wxCheckBox( m_panel4, wxID_EN, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	EnableCh5->SetValue(true);
	
	bSizer2311173->Add( EnableCh5, 0, wxALL, 5 );
	
	
	bSizer2311173->Add( 30, 0, 0, wxEXPAND, 5 );
	
	NameCh5 = new wxComboBox( m_panel4, wxID_ANY, wxT("CH5"), wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
	NameCh5->Append( wxT("O1") );
	NameCh5->Append( wxT("OZ") );
	NameCh5->Append( wxT("O2") );
	NameCh5->Append( wxT("T5") );
	NameCh5->Append( wxT("P5") );
	NameCh5->Append( wxT("P3") );
	NameCh5->Append( wxT("P1") );
	NameCh5->Append( wxT("PZ") );
	NameCh5->Append( wxT("P2") );
	NameCh5->Append( wxT("P4") );
	NameCh5->Append( wxT("P6") );
	NameCh5->Append( wxT("T6") );
	NameCh5->Append( wxT("T3") );
	NameCh5->Append( wxT("C5") );
	NameCh5->Append( wxT("C3") );
	NameCh5->Append( wxT("C1") );
	NameCh5->Append( wxT("CZ") );
	NameCh5->Append( wxT("C2") );
	NameCh5->Append( wxT("C4") );
	NameCh5->Append( wxT("C6") );
	NameCh5->Append( wxT("T4") );
	NameCh5->Append( wxT("FZ") );
	NameCh5->Append( wxT("F5") );
	NameCh5->Append( wxT("F3") );
	NameCh5->Append( wxT("FZ") );
	NameCh5->Append( wxT("F2") );
	NameCh5->Append( wxT("F4") );
	NameCh5->Append( wxT("F6") );
	NameCh5->Append( wxT("F8") );
	NameCh5->Append( wxT("FP1") );
	NameCh5->Append( wxT("FPZ") );
	NameCh5->Append( wxT("FP2") );
	bSizer2311173->Add( NameCh5, 1, wxALL, 5 );
	
	bSizer129->Add( bSizer2311173, 1, wxEXPAND, 5 );
	
	wxBoxSizer* bSizer2311174;
	bSizer2311174 = new wxBoxSizer( wxHORIZONTAL );
	
	Lab6 = new wxStaticText( m_panel4, wxID_ANY, wxT("Ch 6"), wxDefaultPosition, wxDefaultSize, 0 );
	Lab6->Wrap( -1 );
	bSizer2311174->Add( Lab6, 0, wxALL|wxEXPAND, 5 );
	
	
	bSizer2311174->Add( 18, 0, 0, wxEXPAND, 5 );
	
	EnableCh6 = new wxCheckBox( m_panel4, wxID_EN, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	EnableCh6->SetValue(true);
	
	bSizer2311174->Add( EnableCh6, 0, wxALL, 5 );
	
	
	bSizer2311174->Add( 30, 0, 0, wxEXPAND, 5 );
	
	NameCh6 = new wxComboBox( m_panel4, wxID_ANY, wxT("CH6"), wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
	NameCh6->Append( wxT("O1") );
	NameCh6->Append( wxT("OZ") );
	NameCh6->Append( wxT("O2") );
	NameCh6->Append( wxT("T5") );
	NameCh6->Append( wxT("P5") );
	NameCh6->Append( wxT("P3") );
	NameCh6->Append( wxT("P1") );
	NameCh6->Append( wxT("PZ") );
	NameCh6->Append( wxT("P2") );
	NameCh6->Append( wxT("P4") );
	NameCh6->Append( wxT("P6") );
	NameCh6->Append( wxT("T6") );
	NameCh6->Append( wxT("T3") );
	NameCh6->Append( wxT("C5") );
	NameCh6->Append( wxT("C3") );
	NameCh6->Append( wxT("C1") );
	NameCh6->Append( wxT("CZ") );
	NameCh6->Append( wxT("C2") );
	NameCh6->Append( wxT("C4") );
	NameCh6->Append( wxT("C6") );
	NameCh6->Append( wxT("T4") );
	NameCh6->Append( wxT("FZ") );
	NameCh6->Append( wxT("F5") );
	NameCh6->Append( wxT("F3") );
	NameCh6->Append( wxT("FZ") );
	NameCh6->Append( wxT("F2") );
	NameCh6->Append( wxT("F4") );
	NameCh6->Append( wxT("F6") );
	NameCh6->Append( wxT("F8") );
	NameCh6->Append( wxT("FP1") );
	NameCh6->Append( wxT("FPZ") );
	NameCh6->Append( wxT("FP2") );
	bSizer2311174->Add( NameCh6, 1, wxALL, 5 );
	
	bSizer129->Add( bSizer2311174, 1, wxEXPAND, 5 );
	
	wxBoxSizer* bSizer2311175;
	bSizer2311175 = new wxBoxSizer( wxHORIZONTAL );
	
	Lab7 = new wxStaticText( m_panel4, wxID_ANY, wxT("Ch 7"), wxDefaultPosition, wxDefaultSize, 0 );
	Lab7->Wrap( -1 );
	bSizer2311175->Add( Lab7, 0, wxALL|wxEXPAND, 5 );
	
	
	bSizer2311175->Add( 18, 0, 0, wxEXPAND, 5 );
	
	EnableCh7 = new wxCheckBox( m_panel4, wxID_EN, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	EnableCh7->SetValue(true);
	
	bSizer2311175->Add( EnableCh7, 0, wxALL, 5 );
	
	
	bSizer2311175->Add( 30, 0, 0, wxEXPAND, 5 );
	
	NameCh7 = new wxComboBox( m_panel4, wxID_ANY, wxT("CH7"), wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
	NameCh7->Append( wxT("O1") );
	NameCh7->Append( wxT("OZ") );
	NameCh7->Append( wxT("O2") );
	NameCh7->Append( wxT("T5") );
	NameCh7->Append( wxT("P5") );
	NameCh7->Append( wxT("P3") );
	NameCh7->Append( wxT("P1") );
	NameCh7->Append( wxT("PZ") );
	NameCh7->Append( wxT("P2") );
	NameCh7->Append( wxT("P4") );
	NameCh7->Append( wxT("P6") );
	NameCh7->Append( wxT("T6") );
	NameCh7->Append( wxT("T3") );
	NameCh7->Append( wxT("C5") );
	NameCh7->Append( wxT("C3") );
	NameCh7->Append( wxT("C1") );
	NameCh7->Append( wxT("CZ") );
	NameCh7->Append( wxT("C2") );
	NameCh7->Append( wxT("C4") );
	NameCh7->Append( wxT("C6") );
	NameCh7->Append( wxT("T4") );
	NameCh7->Append( wxT("FZ") );
	NameCh7->Append( wxT("F5") );
	NameCh7->Append( wxT("F3") );
	NameCh7->Append( wxT("FZ") );
	NameCh7->Append( wxT("F2") );
	NameCh7->Append( wxT("F4") );
	NameCh7->Append( wxT("F6") );
	NameCh7->Append( wxT("F8") );
	NameCh7->Append( wxT("FP1") );
	NameCh7->Append( wxT("FPZ") );
	NameCh7->Append( wxT("FP2") );
	bSizer2311175->Add( NameCh7, 1, wxALL, 5 );
	
	bSizer129->Add( bSizer2311175, 1, wxEXPAND, 5 );
	
	wxBoxSizer* bSizer2311176;
	bSizer2311176 = new wxBoxSizer( wxHORIZONTAL );
	
	Lab8 = new wxStaticText( m_panel4, wxID_ANY, wxT("Ch 8"), wxDefaultPosition, wxDefaultSize, 0 );
	Lab8->Wrap( -1 );
	bSizer2311176->Add( Lab8, 0, wxALL|wxEXPAND, 5 );
	
	
	bSizer2311176->Add( 18, 0, 0, wxEXPAND, 5 );
	
	EnableCh8 = new wxCheckBox( m_panel4, wxID_EN, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	EnableCh8->SetValue(true);
	
	bSizer2311176->Add( EnableCh8, 0, wxALL, 5 );
	
	
	bSizer2311176->Add( 30, 0, 0, wxEXPAND, 5 );
	
	NameCh8 = new wxComboBox( m_panel4, wxID_ANY, wxT("CH8"), wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
	NameCh8->Append( wxT("O1") );
	NameCh8->Append( wxT("OZ") );
	NameCh8->Append( wxT("O2") );
	NameCh8->Append( wxT("T5") );
	NameCh8->Append( wxT("P5") );
	NameCh8->Append( wxT("P3") );
	NameCh8->Append( wxT("P1") );
	NameCh8->Append( wxT("PZ") );
	NameCh8->Append( wxT("P2") );
	NameCh8->Append( wxT("P4") );
	NameCh8->Append( wxT("P6") );
	NameCh8->Append( wxT("T6") );
	NameCh8->Append( wxT("T3") );
	NameCh8->Append( wxT("C5") );
	NameCh8->Append( wxT("C3") );
	NameCh8->Append( wxT("C1") );
	NameCh8->Append( wxT("CZ") );
	NameCh8->Append( wxT("C2") );
	NameCh8->Append( wxT("C4") );
	NameCh8->Append( wxT("C6") );
	NameCh8->Append( wxT("T4") );
	NameCh8->Append( wxT("FZ") );
	NameCh8->Append( wxT("F5") );
	NameCh8->Append( wxT("F3") );
	NameCh8->Append( wxT("FZ") );
	NameCh8->Append( wxT("F2") );
	NameCh8->Append( wxT("F4") );
	NameCh8->Append( wxT("F6") );
	NameCh8->Append( wxT("F8") );
	NameCh8->Append( wxT("FP1") );
	NameCh8->Append( wxT("FPZ") );
	NameCh8->Append( wxT("FP2") );
	bSizer2311176->Add( NameCh8, 1, wxALL, 5 );
	
	bSizer129->Add( bSizer2311176, 1, wxEXPAND, 5 );
	
	wxBoxSizer* bSizer2311177;
	bSizer2311177 = new wxBoxSizer( wxHORIZONTAL );
	
	LabAux1 = new wxStaticText( m_panel4, wxID_ANY, wxT("AUX 1"), wxDefaultPosition, wxDefaultSize, 0 );
	LabAux1->Wrap( -1 );
	bSizer2311177->Add( LabAux1, 0, wxALL|wxEXPAND, 5 );
	
	
	bSizer2311177->Add( 11, 0, 0, wxEXPAND, 5 );
	
	EnableAux1 = new wxCheckBox( m_panel4, wxID_EN, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	EnableAux1->SetValue(true);
	
	bSizer2311177->Add( EnableAux1, 0, wxALL, 5 );
	
	
	bSizer2311177->Add( 30, 0, 0, wxEXPAND, 5 );
	
	NameAux1 = new wxComboBox( m_panel4, wxID_ANY, wxT("AUX1"), wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
	NameAux1->Append( wxT("GSR") );
	bSizer2311177->Add( NameAux1, 1, wxALL, 5 );
	
	bSizer129->Add( bSizer2311177, 1, wxEXPAND, 5 );
	
	bSizer130->Add( bSizer129, 1, wxEXPAND, 5 );
	
	m_staticline6 = new wxStaticLine( m_panel4, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
	bSizer130->Add( m_staticline6, 0, wxEXPAND | wxALL, 5 );
	
	wxBoxSizer* bSizer1291;
	bSizer1291 = new wxBoxSizer( wxVERTICAL );
	
	wxBoxSizer* bSizer2311178;
	bSizer2311178 = new wxBoxSizer( wxHORIZONTAL );
	
	Lab9 = new wxStaticText( m_panel4, wxID_ANY, wxT("Ch 9"), wxDefaultPosition, wxDefaultSize, 0 );
	Lab9->Wrap( -1 );
	bSizer2311178->Add( Lab9, 0, wxALL|wxEXPAND, 5 );
	
	
	bSizer2311178->Add( 18, 0, 0, wxEXPAND, 5 );
	
	EnableCh9 = new wxCheckBox( m_panel4, wxID_EN, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	EnableCh9->SetValue(true);
	
	bSizer2311178->Add( EnableCh9, 0, wxALL, 5 );
	
	
	bSizer2311178->Add( 30, 0, 0, wxEXPAND, 5 );
	
	NameCh9 = new wxComboBox( m_panel4, wxID_ANY, wxT("CH9"), wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
	NameCh9->Append( wxT("O1") );
	NameCh9->Append( wxT("OZ") );
	NameCh9->Append( wxT("O2") );
	NameCh9->Append( wxT("T5") );
	NameCh9->Append( wxT("P5") );
	NameCh9->Append( wxT("P3") );
	NameCh9->Append( wxT("P1") );
	NameCh9->Append( wxT("PZ") );
	NameCh9->Append( wxT("P2") );
	NameCh9->Append( wxT("P4") );
	NameCh9->Append( wxT("P6") );
	NameCh9->Append( wxT("T6") );
	NameCh9->Append( wxT("T3") );
	NameCh9->Append( wxT("C5") );
	NameCh9->Append( wxT("C3") );
	NameCh9->Append( wxT("C1") );
	NameCh9->Append( wxT("CZ") );
	NameCh9->Append( wxT("C2") );
	NameCh9->Append( wxT("C4") );
	NameCh9->Append( wxT("C6") );
	NameCh9->Append( wxT("T4") );
	NameCh9->Append( wxT("FZ") );
	NameCh9->Append( wxT("F5") );
	NameCh9->Append( wxT("F3") );
	NameCh9->Append( wxT("FZ") );
	NameCh9->Append( wxT("F2") );
	NameCh9->Append( wxT("F4") );
	NameCh9->Append( wxT("F6") );
	NameCh9->Append( wxT("F8") );
	NameCh9->Append( wxT("FP1") );
	NameCh9->Append( wxT("FPZ") );
	NameCh9->Append( wxT("FP2") );
	bSizer2311178->Add( NameCh9, 1, wxALL, 5 );
	
	bSizer1291->Add( bSizer2311178, 1, wxEXPAND, 5 );
	
	wxBoxSizer* bSizer23111712;
	bSizer23111712 = new wxBoxSizer( wxHORIZONTAL );
	
	Lab10 = new wxStaticText( m_panel4, wxID_ANY, wxT("Ch 10"), wxDefaultPosition, wxDefaultSize, 0 );
	Lab10->Wrap( -1 );
	bSizer23111712->Add( Lab10, 0, wxALL|wxEXPAND, 5 );
	
	
	bSizer23111712->Add( 12, 0, 0, wxEXPAND, 5 );
	
	EnableCh10 = new wxCheckBox( m_panel4, wxID_EN, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	EnableCh10->SetValue(true);
	
	bSizer23111712->Add( EnableCh10, 0, wxALL, 5 );
	
	
	bSizer23111712->Add( 30, 0, 0, wxEXPAND, 5 );
	
	NameCh10 = new wxComboBox( m_panel4, wxID_ANY, wxT("CH10"), wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
	NameCh10->Append( wxT("O1") );
	NameCh10->Append( wxT("OZ") );
	NameCh10->Append( wxT("O2") );
	NameCh10->Append( wxT("T5") );
	NameCh10->Append( wxT("P5") );
	NameCh10->Append( wxT("P3") );
	NameCh10->Append( wxT("P1") );
	NameCh10->Append( wxT("PZ") );
	NameCh10->Append( wxT("P2") );
	NameCh10->Append( wxT("P4") );
	NameCh10->Append( wxT("P6") );
	NameCh10->Append( wxT("T6") );
	NameCh10->Append( wxT("T3") );
	NameCh10->Append( wxT("C5") );
	NameCh10->Append( wxT("C3") );
	NameCh10->Append( wxT("C1") );
	NameCh10->Append( wxT("CZ") );
	NameCh10->Append( wxT("C2") );
	NameCh10->Append( wxT("C4") );
	NameCh10->Append( wxT("C6") );
	NameCh10->Append( wxT("T4") );
	NameCh10->Append( wxT("FZ") );
	NameCh10->Append( wxT("F5") );
	NameCh10->Append( wxT("F3") );
	NameCh10->Append( wxT("FZ") );
	NameCh10->Append( wxT("F2") );
	NameCh10->Append( wxT("F4") );
	NameCh10->Append( wxT("F6") );
	NameCh10->Append( wxT("F8") );
	NameCh10->Append( wxT("FP1") );
	NameCh10->Append( wxT("FPZ") );
	NameCh10->Append( wxT("FP2") );
	bSizer23111712->Add( NameCh10, 1, wxALL, 5 );
	
	bSizer1291->Add( bSizer23111712, 1, wxEXPAND, 5 );
	
	wxBoxSizer* bSizer231117111;
	bSizer231117111 = new wxBoxSizer( wxHORIZONTAL );
	
	Lab11 = new wxStaticText( m_panel4, wxID_ANY, wxT("Ch 11"), wxDefaultPosition, wxDefaultSize, 0 );
	Lab11->Wrap( -1 );
	bSizer231117111->Add( Lab11, 0, wxALL|wxEXPAND, 5 );
	
	
	bSizer231117111->Add( 12, 0, 0, wxEXPAND, 5 );
	
	EnableCh11 = new wxCheckBox( m_panel4, wxID_EN, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	EnableCh11->SetValue(true);
	
	bSizer231117111->Add( EnableCh11, 0, wxALL, 5 );
	
	
	bSizer231117111->Add( 30, 0, 0, wxEXPAND, 5 );
	
	NameCh11 = new wxComboBox( m_panel4, wxID_ANY, wxT("CH11"), wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
	NameCh11->Append( wxT("O1") );
	NameCh11->Append( wxT("OZ") );
	NameCh11->Append( wxT("O2") );
	NameCh11->Append( wxT("T5") );
	NameCh11->Append( wxT("P5") );
	NameCh11->Append( wxT("P3") );
	NameCh11->Append( wxT("P1") );
	NameCh11->Append( wxT("PZ") );
	NameCh11->Append( wxT("P2") );
	NameCh11->Append( wxT("P4") );
	NameCh11->Append( wxT("P6") );
	NameCh11->Append( wxT("T6") );
	NameCh11->Append( wxT("T3") );
	NameCh11->Append( wxT("C5") );
	NameCh11->Append( wxT("C3") );
	NameCh11->Append( wxT("C1") );
	NameCh11->Append( wxT("CZ") );
	NameCh11->Append( wxT("C2") );
	NameCh11->Append( wxT("C4") );
	NameCh11->Append( wxT("C6") );
	NameCh11->Append( wxT("T4") );
	NameCh11->Append( wxT("FZ") );
	NameCh11->Append( wxT("F5") );
	NameCh11->Append( wxT("F3") );
	NameCh11->Append( wxT("FZ") );
	NameCh11->Append( wxT("F2") );
	NameCh11->Append( wxT("F4") );
	NameCh11->Append( wxT("F6") );
	NameCh11->Append( wxT("F8") );
	NameCh11->Append( wxT("FP1") );
	NameCh11->Append( wxT("FPZ") );
	NameCh11->Append( wxT("FP2") );
	bSizer231117111->Add( NameCh11, 1, wxALL, 5 );
	
	bSizer1291->Add( bSizer231117111, 1, wxEXPAND, 5 );
	
	wxBoxSizer* bSizer23111721;
	bSizer23111721 = new wxBoxSizer( wxHORIZONTAL );
	
	Lab12 = new wxStaticText( m_panel4, wxID_ANY, wxT("Ch 12"), wxDefaultPosition, wxDefaultSize, 0 );
	Lab12->Wrap( -1 );
	bSizer23111721->Add( Lab12, 0, wxALL|wxEXPAND, 5 );
	
	
	bSizer23111721->Add( 12, 0, 0, wxEXPAND, 5 );
	
	EnableCh12 = new wxCheckBox( m_panel4, wxID_EN, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	EnableCh12->SetValue(true);
	
	bSizer23111721->Add( EnableCh12, 0, wxALL, 5 );
	
	
	bSizer23111721->Add( 30, 0, 0, wxEXPAND, 5 );
	
	NameCh12 = new wxComboBox( m_panel4, wxID_ANY, wxT("CH12"), wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
	NameCh12->Append( wxT("O1") );
	NameCh12->Append( wxT("OZ") );
	NameCh12->Append( wxT("O2") );
	NameCh12->Append( wxT("T5") );
	NameCh12->Append( wxT("P5") );
	NameCh12->Append( wxT("P3") );
	NameCh12->Append( wxT("P1") );
	NameCh12->Append( wxT("PZ") );
	NameCh12->Append( wxT("P2") );
	NameCh12->Append( wxT("P4") );
	NameCh12->Append( wxT("P6") );
	NameCh12->Append( wxT("T6") );
	NameCh12->Append( wxT("T3") );
	NameCh12->Append( wxT("C5") );
	NameCh12->Append( wxT("C3") );
	NameCh12->Append( wxT("C1") );
	NameCh12->Append( wxT("CZ") );
	NameCh12->Append( wxT("C2") );
	NameCh12->Append( wxT("C4") );
	NameCh12->Append( wxT("C6") );
	NameCh12->Append( wxT("T4") );
	NameCh12->Append( wxT("FZ") );
	NameCh12->Append( wxT("F5") );
	NameCh12->Append( wxT("F3") );
	NameCh12->Append( wxT("FZ") );
	NameCh12->Append( wxT("F2") );
	NameCh12->Append( wxT("F4") );
	NameCh12->Append( wxT("F6") );
	NameCh12->Append( wxT("F8") );
	NameCh12->Append( wxT("FP1") );
	NameCh12->Append( wxT("FPZ") );
	NameCh12->Append( wxT("FP2") );
	bSizer23111721->Add( NameCh12, 1, wxALL, 5 );
	
	bSizer1291->Add( bSizer23111721, 1, wxEXPAND, 5 );
	
	wxBoxSizer* bSizer23111731;
	bSizer23111731 = new wxBoxSizer( wxHORIZONTAL );
	
	Lab13 = new wxStaticText( m_panel4, wxID_ANY, wxT("Ch 13"), wxDefaultPosition, wxDefaultSize, 0 );
	Lab13->Wrap( -1 );
	bSizer23111731->Add( Lab13, 0, wxALL|wxEXPAND, 5 );
	
	
	bSizer23111731->Add( 12, 0, 0, wxEXPAND, 5 );
	
	EnableCh13 = new wxCheckBox( m_panel4, wxID_EN, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	EnableCh13->SetValue(true);
	
	bSizer23111731->Add( EnableCh13, 0, wxALL, 5 );
	
	
	bSizer23111731->Add( 30, 0, 0, wxEXPAND, 5 );
	
	NameCh13 = new wxComboBox( m_panel4, wxID_ANY, wxT("CH13"), wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
	NameCh13->Append( wxT("O1") );
	NameCh13->Append( wxT("OZ") );
	NameCh13->Append( wxT("O2") );
	NameCh13->Append( wxT("T5") );
	NameCh13->Append( wxT("P5") );
	NameCh13->Append( wxT("P3") );
	NameCh13->Append( wxT("P1") );
	NameCh13->Append( wxT("PZ") );
	NameCh13->Append( wxT("P2") );
	NameCh13->Append( wxT("P4") );
	NameCh13->Append( wxT("P6") );
	NameCh13->Append( wxT("T6") );
	NameCh13->Append( wxT("T3") );
	NameCh13->Append( wxT("C5") );
	NameCh13->Append( wxT("C3") );
	NameCh13->Append( wxT("C1") );
	NameCh13->Append( wxT("CZ") );
	NameCh13->Append( wxT("C2") );
	NameCh13->Append( wxT("C4") );
	NameCh13->Append( wxT("C6") );
	NameCh13->Append( wxT("T4") );
	NameCh13->Append( wxT("FZ") );
	NameCh13->Append( wxT("F5") );
	NameCh13->Append( wxT("F3") );
	NameCh13->Append( wxT("FZ") );
	NameCh13->Append( wxT("F2") );
	NameCh13->Append( wxT("F4") );
	NameCh13->Append( wxT("F6") );
	NameCh13->Append( wxT("F8") );
	NameCh13->Append( wxT("FP1") );
	NameCh13->Append( wxT("FPZ") );
	NameCh13->Append( wxT("FP2") );
	bSizer23111731->Add( NameCh13, 1, wxALL, 5 );
	
	bSizer1291->Add( bSizer23111731, 1, wxEXPAND, 5 );
	
	wxBoxSizer* bSizer23111741;
	bSizer23111741 = new wxBoxSizer( wxHORIZONTAL );
	
	Lab14 = new wxStaticText( m_panel4, wxID_ANY, wxT("Ch 14"), wxDefaultPosition, wxDefaultSize, 0 );
	Lab14->Wrap( -1 );
	bSizer23111741->Add( Lab14, 0, wxALL|wxEXPAND, 5 );
	
	
	bSizer23111741->Add( 12, 0, 0, wxEXPAND, 5 );
	
	EnableCh14 = new wxCheckBox( m_panel4, wxID_EN, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	EnableCh14->SetValue(true);
	
	bSizer23111741->Add( EnableCh14, 0, wxALL, 5 );
	
	
	bSizer23111741->Add( 30, 0, 0, wxEXPAND, 5 );
	
	NameCh14 = new wxComboBox( m_panel4, wxID_ANY, wxT("CH14"), wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
	NameCh14->Append( wxT("O1") );
	NameCh14->Append( wxT("OZ") );
	NameCh14->Append( wxT("O2") );
	NameCh14->Append( wxT("T5") );
	NameCh14->Append( wxT("P5") );
	NameCh14->Append( wxT("P3") );
	NameCh14->Append( wxT("P1") );
	NameCh14->Append( wxT("PZ") );
	NameCh14->Append( wxT("P2") );
	NameCh14->Append( wxT("P4") );
	NameCh14->Append( wxT("P6") );
	NameCh14->Append( wxT("T6") );
	NameCh14->Append( wxT("T3") );
	NameCh14->Append( wxT("C5") );
	NameCh14->Append( wxT("C3") );
	NameCh14->Append( wxT("C1") );
	NameCh14->Append( wxT("CZ") );
	NameCh14->Append( wxT("C2") );
	NameCh14->Append( wxT("C4") );
	NameCh14->Append( wxT("C6") );
	NameCh14->Append( wxT("T4") );
	NameCh14->Append( wxT("FZ") );
	NameCh14->Append( wxT("F5") );
	NameCh14->Append( wxT("F3") );
	NameCh14->Append( wxT("FZ") );
	NameCh14->Append( wxT("F2") );
	NameCh14->Append( wxT("F4") );
	NameCh14->Append( wxT("F6") );
	NameCh14->Append( wxT("F8") );
	NameCh14->Append( wxT("FP1") );
	NameCh14->Append( wxT("FPZ") );
	NameCh14->Append( wxT("FP2") );
	bSizer23111741->Add( NameCh14, 1, wxALL, 5 );
	
	bSizer1291->Add( bSizer23111741, 1, wxEXPAND, 5 );
	
	wxBoxSizer* bSizer23111751;
	bSizer23111751 = new wxBoxSizer( wxHORIZONTAL );
	
	Lab15 = new wxStaticText( m_panel4, wxID_ANY, wxT("Ch 15"), wxDefaultPosition, wxDefaultSize, 0 );
	Lab15->Wrap( -1 );
	bSizer23111751->Add( Lab15, 0, wxALL|wxEXPAND, 5 );
	
	
	bSizer23111751->Add( 12, 0, 0, wxEXPAND, 5 );
	
	EnableCh15 = new wxCheckBox( m_panel4, wxID_EN, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	EnableCh15->SetValue(true);
	
	bSizer23111751->Add( EnableCh15, 0, wxALL, 5 );
	
	
	bSizer23111751->Add( 30, 0, 0, wxEXPAND, 5 );
	
	NameCh15 = new wxComboBox( m_panel4, wxID_ANY, wxT("CH15"), wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
	NameCh15->Append( wxT("O1") );
	NameCh15->Append( wxT("OZ") );
	NameCh15->Append( wxT("O2") );
	NameCh15->Append( wxT("T5") );
	NameCh15->Append( wxT("P5") );
	NameCh15->Append( wxT("P3") );
	NameCh15->Append( wxT("P1") );
	NameCh15->Append( wxT("PZ") );
	NameCh15->Append( wxT("P2") );
	NameCh15->Append( wxT("P4") );
	NameCh15->Append( wxT("P6") );
	NameCh15->Append( wxT("T6") );
	NameCh15->Append( wxT("T3") );
	NameCh15->Append( wxT("C5") );
	NameCh15->Append( wxT("C3") );
	NameCh15->Append( wxT("C1") );
	NameCh15->Append( wxT("CZ") );
	NameCh15->Append( wxT("C2") );
	NameCh15->Append( wxT("C4") );
	NameCh15->Append( wxT("C6") );
	NameCh15->Append( wxT("T4") );
	NameCh15->Append( wxT("FZ") );
	NameCh15->Append( wxT("F5") );
	NameCh15->Append( wxT("F3") );
	NameCh15->Append( wxT("FZ") );
	NameCh15->Append( wxT("F2") );
	NameCh15->Append( wxT("F4") );
	NameCh15->Append( wxT("F6") );
	NameCh15->Append( wxT("F8") );
	NameCh15->Append( wxT("FP1") );
	NameCh15->Append( wxT("FPZ") );
	NameCh15->Append( wxT("FP2") );
	bSizer23111751->Add( NameCh15, 1, wxALL, 5 );
	
	bSizer1291->Add( bSizer23111751, 1, wxEXPAND, 5 );
	
	wxBoxSizer* bSizer23111761;
	bSizer23111761 = new wxBoxSizer( wxHORIZONTAL );
	
	Lab16 = new wxStaticText( m_panel4, wxID_ANY, wxT("Ch 16"), wxDefaultPosition, wxDefaultSize, 0 );
	Lab16->Wrap( -1 );
	bSizer23111761->Add( Lab16, 0, wxALL|wxEXPAND, 5 );
	
	
	bSizer23111761->Add( 12, 0, 0, wxEXPAND, 5 );
	
	EnableCh16 = new wxCheckBox( m_panel4, wxID_EN, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	EnableCh16->SetValue(true);
	
	bSizer23111761->Add( EnableCh16, 0, wxALL, 5 );
	
	
	bSizer23111761->Add( 30, 0, 0, wxEXPAND, 5 );
	
	NameCh16 = new wxComboBox( m_panel4, wxID_ANY, wxT("CH16"), wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
	NameCh16->Append( wxT("O1") );
	NameCh16->Append( wxT("OZ") );
	NameCh16->Append( wxT("O2") );
	NameCh16->Append( wxT("T5") );
	NameCh16->Append( wxT("P5") );
	NameCh16->Append( wxT("P3") );
	NameCh16->Append( wxT("P1") );
	NameCh16->Append( wxT("PZ") );
	NameCh16->Append( wxT("P2") );
	NameCh16->Append( wxT("P4") );
	NameCh16->Append( wxT("P6") );
	NameCh16->Append( wxT("T6") );
	NameCh16->Append( wxT("T3") );
	NameCh16->Append( wxT("C5") );
	NameCh16->Append( wxT("C3") );
	NameCh16->Append( wxT("C1") );
	NameCh16->Append( wxT("CZ") );
	NameCh16->Append( wxT("C2") );
	NameCh16->Append( wxT("C4") );
	NameCh16->Append( wxT("C6") );
	NameCh16->Append( wxT("T4") );
	NameCh16->Append( wxT("FZ") );
	NameCh16->Append( wxT("F5") );
	NameCh16->Append( wxT("F3") );
	NameCh16->Append( wxT("FZ") );
	NameCh16->Append( wxT("F2") );
	NameCh16->Append( wxT("F4") );
	NameCh16->Append( wxT("F6") );
	NameCh16->Append( wxT("F8") );
	NameCh16->Append( wxT("FP1") );
	NameCh16->Append( wxT("FPZ") );
	NameCh16->Append( wxT("FP2") );
	bSizer23111761->Add( NameCh16, 1, wxALL, 5 );
	
	bSizer1291->Add( bSizer23111761, 1, wxEXPAND, 5 );
	
	wxBoxSizer* bSizer23111771;
	bSizer23111771 = new wxBoxSizer( wxHORIZONTAL );
	
	LabAux2 = new wxStaticText( m_panel4, wxID_ANY, wxT("AUX 2"), wxDefaultPosition, wxDefaultSize, 0 );
	LabAux2->Wrap( -1 );
	bSizer23111771->Add( LabAux2, 0, wxALL|wxEXPAND, 5 );
	
	
	bSizer23111771->Add( 11, 0, 0, wxEXPAND, 5 );
	
	EnableAux2 = new wxCheckBox( m_panel4, wxID_EN, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	EnableAux2->SetValue(true);
	
	bSizer23111771->Add( EnableAux2, 0, wxALL, 5 );
	
	
	bSizer23111771->Add( 30, 0, 0, wxEXPAND, 5 );
	
	NameAux2 = new wxComboBox( m_panel4, wxID_ANY, wxT("AUX2"), wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
	NameAux2->Append( wxT("O1") );
	NameAux2->Append( wxT("OZ") );
	NameAux2->Append( wxT("O2") );
	NameAux2->Append( wxT("T5") );
	NameAux2->Append( wxT("P5") );
	NameAux2->Append( wxT("P3") );
	NameAux2->Append( wxT("P1") );
	NameAux2->Append( wxT("PZ") );
	NameAux2->Append( wxT("P2") );
	NameAux2->Append( wxT("P4") );
	NameAux2->Append( wxT("P6") );
	NameAux2->Append( wxT("T6") );
	NameAux2->Append( wxT("T3") );
	NameAux2->Append( wxT("C5") );
	NameAux2->Append( wxT("C3") );
	NameAux2->Append( wxT("C1") );
	NameAux2->Append( wxT("CZ") );
	NameAux2->Append( wxT("C2") );
	NameAux2->Append( wxT("C4") );
	NameAux2->Append( wxT("C6") );
	NameAux2->Append( wxT("T4") );
	NameAux2->Append( wxT("FZ") );
	NameAux2->Append( wxT("F5") );
	NameAux2->Append( wxT("F3") );
	NameAux2->Append( wxT("FZ") );
	NameAux2->Append( wxT("F2") );
	NameAux2->Append( wxT("F4") );
	NameAux2->Append( wxT("F6") );
	NameAux2->Append( wxT("F8") );
	NameAux2->Append( wxT("FP1") );
	NameAux2->Append( wxT("FPZ") );
	NameAux2->Append( wxT("FP2") );
	bSizer23111771->Add( NameAux2, 1, wxALL, 5 );
	
	bSizer1291->Add( bSizer23111771, 1, wxEXPAND, 5 );
	
	bSizer130->Add( bSizer1291, 1, wxEXPAND, 5 );
	
	fgSizer2->Add( bSizer130, 1, wxEXPAND, 5 );
	
	wxBoxSizer* bSizer246;
	bSizer246 = new wxBoxSizer( wxHORIZONTAL );
	
	Clc_Button = new wxButton( m_panel4, wxID_CLCBUTTON, wxT("&Clear"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer246->Add( Clc_Button, 0, wxALL, 5 );
	
	Delete = new wxButton( m_panel4, wxID_ANY, wxT("Delete Conf."), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer246->Add( Delete, 0, wxALL, 5 );
	
	Save = new wxButton( m_panel4, wxID_ANY, wxT("&Save Conf."), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer246->Add( Save, 0, wxALL, 5 );
	
	OkButton = new wxButton( m_panel4, wxID_SaveButton, wxT("O&k"), wxDefaultPosition, wxDefaultSize, 0 );
	OkButton->SetDefault(); 
	bSizer246->Add( OkButton, 0, wxALL, 5 );
	
	fgSizer2->Add( bSizer246, 1, wxALIGN_RIGHT|wxALL, 5 );
	
	m_panel4->SetSizer( fgSizer2 );
	m_panel4->Layout();
	fgSizer2->Fit( m_panel4 );
	bSizer66->Add( m_panel4, 1, wxEXPAND | wxALL, 0 );
	
	this->SetSizer( bSizer66 );
	this->Layout();
	bSizer66->Fit( this );
	
	this->Centre( wxBOTH );
	
	// Connect Events
	AcqMode->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( VAmpDialog::OnFreq ), NULL, this );
	preset->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( VAmpDialog::OnConfig ), NULL, this );
	EnableCh1->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( VAmpDialog::Control ), NULL, this );
	EnableCh2->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( VAmpDialog::Control ), NULL, this );
	EnableCh3->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( VAmpDialog::Control ), NULL, this );
	EnableCh4->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( VAmpDialog::Control ), NULL, this );
	EnableCh5->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( VAmpDialog::Control ), NULL, this );
	EnableCh6->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( VAmpDialog::Control ), NULL, this );
	EnableCh7->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( VAmpDialog::Control ), NULL, this );
	EnableCh8->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( VAmpDialog::Control ), NULL, this );
	EnableAux1->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( VAmpDialog::Control ), NULL, this );
	EnableCh9->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( VAmpDialog::Control ), NULL, this );
	EnableCh10->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( VAmpDialog::Control ), NULL, this );
	EnableCh11->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( VAmpDialog::Control ), NULL, this );
	EnableCh12->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( VAmpDialog::Control ), NULL, this );
	EnableCh13->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( VAmpDialog::Control ), NULL, this );
	EnableCh14->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( VAmpDialog::Control ), NULL, this );
	EnableCh15->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( VAmpDialog::Control ), NULL, this );
	EnableCh16->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( VAmpDialog::Control ), NULL, this );
	EnableAux2->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( VAmpDialog::Control ), NULL, this );
	Clc_Button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( VAmpDialog::OnClear ), NULL, this );
	Delete->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( VAmpDialog::OnDelete ), NULL, this );
	Save->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( VAmpDialog::OnSaveConfig ), NULL, this );
	OkButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( VAmpDialog::OnOk ), NULL, this );
}

VAmpDialog::~VAmpDialog()
{
	// Disconnect Events
	AcqMode->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( VAmpDialog::OnFreq ), NULL, this );
	preset->Disconnect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( VAmpDialog::OnConfig ), NULL, this );
	EnableCh1->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( VAmpDialog::Control ), NULL, this );
	EnableCh2->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( VAmpDialog::Control ), NULL, this );
	EnableCh3->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( VAmpDialog::Control ), NULL, this );
	EnableCh4->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( VAmpDialog::Control ), NULL, this );
	EnableCh5->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( VAmpDialog::Control ), NULL, this );
	EnableCh6->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( VAmpDialog::Control ), NULL, this );
	EnableCh7->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( VAmpDialog::Control ), NULL, this );
	EnableCh8->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( VAmpDialog::Control ), NULL, this );
	EnableAux1->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( VAmpDialog::Control ), NULL, this );
	EnableCh9->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( VAmpDialog::Control ), NULL, this );
	EnableCh10->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( VAmpDialog::Control ), NULL, this );
	EnableCh11->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( VAmpDialog::Control ), NULL, this );
	EnableCh12->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( VAmpDialog::Control ), NULL, this );
	EnableCh13->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( VAmpDialog::Control ), NULL, this );
	EnableCh14->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( VAmpDialog::Control ), NULL, this );
	EnableCh15->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( VAmpDialog::Control ), NULL, this );
	EnableCh16->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( VAmpDialog::Control ), NULL, this );
	EnableAux2->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( VAmpDialog::Control ), NULL, this );
	Clc_Button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( VAmpDialog::OnClear ), NULL, this );
	Delete->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( VAmpDialog::OnDelete ), NULL, this );
	Save->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( VAmpDialog::OnSaveConfig ), NULL, this );
	OkButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( VAmpDialog::OnOk ), NULL, this );
}

gUsbAmpDialog::gUsbAmpDialog( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxDefaultSize, wxDefaultSize );
	
	wxBoxSizer* bSizer66;
	bSizer66 = new wxBoxSizer( wxVERTICAL );
	
	m_panel4 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	wxFlexGridSizer* fgSizer2;
	fgSizer2 = new wxFlexGridSizer( 4, 1, 0, 0 );
	fgSizer2->SetFlexibleDirection( wxVERTICAL );
	fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
	
	wxBoxSizer* bSizer46;
	bSizer46 = new wxBoxSizer( wxVERTICAL );
	
	m_staticText36 = new wxStaticText( m_panel4, wxID_ANY, wxT("gUSBamp - g.tec"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText36->Wrap( -1 );
	m_staticText36->SetFont( wxFont( 13, 74, 90, 92, false, wxEmptyString ) );
	
	bSizer46->Add( m_staticText36, 0, wxALIGN_CENTER|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
	
	wxBoxSizer* bSizer1281;
	bSizer1281 = new wxBoxSizer( wxHORIZONTAL );
	
	m_staticText1721 = new wxStaticText( m_panel4, wxID_ANY, wxT("Sample Frequency:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText1721->Wrap( -1 );
	m_staticText1721->SetFont( wxFont( 8, 74, 90, 92, false, wxT("Tahoma") ) );
	
	bSizer1281->Add( m_staticText1721, 0, wxALIGN_CENTER, 5 );
	
	wxString m_freqChoices[] = { wxT("32"), wxT("64"), wxT("128"), wxT("256"), wxT("512"), wxT("600"), wxT("1200"), wxT("2400"), wxT("4800"), wxT("9600"), wxT("19200"), wxT("38400") };
	int m_freqNChoices = sizeof( m_freqChoices ) / sizeof( wxString );
	m_freq = new wxChoice( m_panel4, wxID_FREQ, wxDefaultPosition, wxSize( 100,-1 ), m_freqNChoices, m_freqChoices, 0 );
	m_freq->SetSelection( 5 );
	bSizer1281->Add( m_freq, 0, wxALL, 5 );
	
	bSizer46->Add( bSizer1281, 0, wxALIGN_CENTER, 5 );
	
	wxBoxSizer* bSizer130;
	bSizer130 = new wxBoxSizer( wxHORIZONTAL );
	
	wxBoxSizer* bSizer129;
	bSizer129 = new wxBoxSizer( wxVERTICAL );
	
	m_staticText176 = new wxStaticText( m_panel4, wxID_ANY, wxT("Common ground:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText176->Wrap( -1 );
	m_staticText176->SetFont( wxFont( 8, 74, 90, 92, false, wxT("Tahoma") ) );
	
	bSizer129->Add( m_staticText176, 0, wxALIGN_CENTER|wxBOTTOM|wxTOP, 5 );
	
	wxBoxSizer* bSizer231117;
	bSizer231117 = new wxBoxSizer( wxHORIZONTAL );
	
	Lab1 = new wxStaticText( m_panel4, wxID_ANY, wxT("Ground 1:"), wxDefaultPosition, wxDefaultSize, 0 );
	Lab1->Wrap( -1 );
	bSizer231117->Add( Lab1, 0, wxALL|wxEXPAND, 5 );
	
	
	bSizer231117->Add( 18, 0, 0, wxEXPAND, 5 );
	
	Gnd1 = new wxCheckBox( m_panel4, wxID_EN, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	
	bSizer231117->Add( Gnd1, 0, wxALL, 5 );
	
	
	bSizer231117->Add( 30, 0, 0, wxEXPAND, 5 );
	
	bSizer129->Add( bSizer231117, 1, wxEXPAND, 5 );
	
	wxBoxSizer* bSizer2311171;
	bSizer2311171 = new wxBoxSizer( wxHORIZONTAL );
	
	Lab2 = new wxStaticText( m_panel4, wxID_ANY, wxT("Ground 2:"), wxDefaultPosition, wxDefaultSize, 0 );
	Lab2->Wrap( -1 );
	bSizer2311171->Add( Lab2, 0, wxALL|wxEXPAND, 5 );
	
	
	bSizer2311171->Add( 18, 0, 0, wxEXPAND, 5 );
	
	Gnd2 = new wxCheckBox( m_panel4, wxID_EN, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	
	bSizer2311171->Add( Gnd2, 0, wxALL, 5 );
	
	
	bSizer2311171->Add( 30, 0, 0, wxEXPAND, 5 );
	
	bSizer129->Add( bSizer2311171, 1, wxEXPAND, 5 );
	
	wxBoxSizer* bSizer23111711;
	bSizer23111711 = new wxBoxSizer( wxHORIZONTAL );
	
	Lab3 = new wxStaticText( m_panel4, wxID_ANY, wxT("Ground 3:"), wxDefaultPosition, wxDefaultSize, 0 );
	Lab3->Wrap( -1 );
	bSizer23111711->Add( Lab3, 0, wxALL|wxEXPAND, 5 );
	
	
	bSizer23111711->Add( 18, 0, 0, wxEXPAND, 5 );
	
	Gnd3 = new wxCheckBox( m_panel4, wxID_EN, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	
	bSizer23111711->Add( Gnd3, 0, wxALL, 5 );
	
	
	bSizer23111711->Add( 30, 0, 0, wxEXPAND, 5 );
	
	bSizer129->Add( bSizer23111711, 1, wxEXPAND, 5 );
	
	wxBoxSizer* bSizer2311172;
	bSizer2311172 = new wxBoxSizer( wxHORIZONTAL );
	
	Lab4 = new wxStaticText( m_panel4, wxID_ANY, wxT("Ground 4:"), wxDefaultPosition, wxDefaultSize, 0 );
	Lab4->Wrap( -1 );
	bSizer2311172->Add( Lab4, 0, wxALL|wxEXPAND, 5 );
	
	
	bSizer2311172->Add( 18, 0, 0, wxEXPAND, 5 );
	
	Gnd4 = new wxCheckBox( m_panel4, wxID_EN, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	
	bSizer2311172->Add( Gnd4, 0, wxALL, 5 );
	
	
	bSizer2311172->Add( 30, 0, 0, wxEXPAND, 5 );
	
	bSizer129->Add( bSizer2311172, 1, wxEXPAND, 5 );
	
	bSizer130->Add( bSizer129, 1, wxEXPAND, 5 );
	
	m_staticline6 = new wxStaticLine( m_panel4, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
	bSizer130->Add( m_staticline6, 0, wxEXPAND | wxALL, 5 );
	
	wxBoxSizer* bSizer1291;
	bSizer1291 = new wxBoxSizer( wxVERTICAL );
	
	m_staticText1761 = new wxStaticText( m_panel4, wxID_ANY, wxT("Common Reference:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText1761->Wrap( -1 );
	m_staticText1761->SetFont( wxFont( 8, 74, 90, 92, false, wxT("Tahoma") ) );
	
	bSizer1291->Add( m_staticText1761, 0, wxALIGN_CENTER|wxBOTTOM|wxTOP, 5 );
	
	wxBoxSizer* bSizer2311178;
	bSizer2311178 = new wxBoxSizer( wxHORIZONTAL );
	
	Lab9 = new wxStaticText( m_panel4, wxID_ANY, wxT("Reference 1:"), wxDefaultPosition, wxDefaultSize, 0 );
	Lab9->Wrap( -1 );
	bSizer2311178->Add( Lab9, 0, wxALL|wxEXPAND, 5 );
	
	
	bSizer2311178->Add( 12, 0, 0, wxEXPAND, 5 );
	
	Ref1 = new wxCheckBox( m_panel4, wxID_EN, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	
	bSizer2311178->Add( Ref1, 0, wxALL, 5 );
	
	
	bSizer2311178->Add( 30, 0, 0, wxEXPAND, 5 );
	
	bSizer1291->Add( bSizer2311178, 1, wxEXPAND, 5 );
	
	wxBoxSizer* bSizer23111712;
	bSizer23111712 = new wxBoxSizer( wxHORIZONTAL );
	
	Lab10 = new wxStaticText( m_panel4, wxID_ANY, wxT("Reference 2:"), wxDefaultPosition, wxDefaultSize, 0 );
	Lab10->Wrap( -1 );
	bSizer23111712->Add( Lab10, 0, wxALL|wxEXPAND, 5 );
	
	
	bSizer23111712->Add( 12, 0, 0, wxEXPAND, 5 );
	
	Ref2 = new wxCheckBox( m_panel4, wxID_EN, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	
	bSizer23111712->Add( Ref2, 0, wxALL, 5 );
	
	
	bSizer23111712->Add( 30, 0, 0, wxEXPAND, 5 );
	
	bSizer1291->Add( bSizer23111712, 1, wxEXPAND, 5 );
	
	wxBoxSizer* bSizer231117111;
	bSizer231117111 = new wxBoxSizer( wxHORIZONTAL );
	
	Lab11 = new wxStaticText( m_panel4, wxID_ANY, wxT("Reference 3:"), wxDefaultPosition, wxDefaultSize, 0 );
	Lab11->Wrap( -1 );
	bSizer231117111->Add( Lab11, 0, wxALL|wxEXPAND, 5 );
	
	
	bSizer231117111->Add( 12, 0, 0, wxEXPAND, 5 );
	
	Ref3 = new wxCheckBox( m_panel4, wxID_EN, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	
	bSizer231117111->Add( Ref3, 0, wxALL, 5 );
	
	
	bSizer231117111->Add( 30, 0, 0, wxEXPAND, 5 );
	
	bSizer1291->Add( bSizer231117111, 1, wxEXPAND, 5 );
	
	wxBoxSizer* bSizer23111721;
	bSizer23111721 = new wxBoxSizer( wxHORIZONTAL );
	
	Lab12 = new wxStaticText( m_panel4, wxID_ANY, wxT("Reference 4:"), wxDefaultPosition, wxDefaultSize, 0 );
	Lab12->Wrap( -1 );
	bSizer23111721->Add( Lab12, 0, wxALL|wxEXPAND, 5 );
	
	
	bSizer23111721->Add( 12, 0, 0, wxEXPAND, 5 );
	
	Ref4 = new wxCheckBox( m_panel4, wxID_EN, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	
	bSizer23111721->Add( Ref4, 0, wxALL, 5 );
	
	
	bSizer23111721->Add( 30, 0, 0, wxEXPAND, 5 );
	
	bSizer1291->Add( bSizer23111721, 1, wxEXPAND, 5 );
	
	bSizer130->Add( bSizer1291, 1, wxEXPAND, 5 );
	
	bSizer46->Add( bSizer130, 1, wxEXPAND, 5 );
	
	wxBoxSizer* bSizer1283;
	bSizer1283 = new wxBoxSizer( wxVERTICAL );
	
	m_staticText1723 = new wxStaticText( m_panel4, wxID_ANY, wxT("Channels selection:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText1723->Wrap( -1 );
	m_staticText1723->SetFont( wxFont( 8, 74, 90, 92, false, wxT("Tahoma") ) );
	
	bSizer1283->Add( m_staticText1723, 0, wxALIGN_CENTER|wxALL, 3 );
	
	wxBoxSizer* bSizer1293;
	bSizer1293 = new wxBoxSizer( wxHORIZONTAL );
	
	m_staticText162 = new wxStaticText( m_panel4, wxID_ANY, wxT("1."), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText162->Wrap( -1 );
	bSizer1293->Add( m_staticText162, 0, wxBOTTOM|wxLEFT|wxTOP, 5 );
	
	selCh1 = new wxCheckBox( m_panel4, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	
	bSizer1293->Add( selCh1, 0, wxALL|wxLEFT|wxTOP, 5 );
	
	
	bSizer1293->Add( 6, 0, 0, wxEXPAND, 5 );
	
	m_staticText1626 = new wxStaticText( m_panel4, wxID_ANY, wxT("2."), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText1626->Wrap( -1 );
	bSizer1293->Add( m_staticText1626, 0, wxBOTTOM|wxTOP, 5 );
	
	selCh2 = new wxCheckBox( m_panel4, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	
	bSizer1293->Add( selCh2, 0, wxALL, 5 );
	
	
	bSizer1293->Add( 6, 0, 1, wxEXPAND, 5 );
	
	m_staticText1625 = new wxStaticText( m_panel4, wxID_ANY, wxT("3."), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText1625->Wrap( -1 );
	bSizer1293->Add( m_staticText1625, 0, wxBOTTOM|wxTOP, 5 );
	
	selCh3 = new wxCheckBox( m_panel4, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	
	bSizer1293->Add( selCh3, 0, wxALL, 5 );
	
	
	bSizer1293->Add( 6, 0, 1, wxEXPAND, 5 );
	
	m_staticText1624 = new wxStaticText( m_panel4, wxID_ANY, wxT("4."), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText1624->Wrap( -1 );
	bSizer1293->Add( m_staticText1624, 0, wxBOTTOM|wxTOP, 5 );
	
	selCh4 = new wxCheckBox( m_panel4, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	
	bSizer1293->Add( selCh4, 0, wxALL, 5 );
	
	
	bSizer1293->Add( 6, 0, 1, wxEXPAND, 5 );
	
	m_staticText1623 = new wxStaticText( m_panel4, wxID_ANY, wxT("5."), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText1623->Wrap( -1 );
	bSizer1293->Add( m_staticText1623, 0, wxBOTTOM|wxTOP, 5 );
	
	selCh5 = new wxCheckBox( m_panel4, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	
	bSizer1293->Add( selCh5, 0, wxALL, 5 );
	
	
	bSizer1293->Add( 6, 0, 1, wxEXPAND, 5 );
	
	m_staticText1622 = new wxStaticText( m_panel4, wxID_ANY, wxT("6."), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText1622->Wrap( -1 );
	bSizer1293->Add( m_staticText1622, 0, wxBOTTOM|wxTOP, 5 );
	
	selCh6 = new wxCheckBox( m_panel4, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	
	bSizer1293->Add( selCh6, 0, wxALL, 5 );
	
	
	bSizer1293->Add( 5, 0, 1, wxEXPAND, 5 );
	
	m_staticText1621 = new wxStaticText( m_panel4, wxID_ANY, wxT("7."), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText1621->Wrap( -1 );
	bSizer1293->Add( m_staticText1621, 0, wxBOTTOM|wxTOP, 5 );
	
	selCh7 = new wxCheckBox( m_panel4, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	
	bSizer1293->Add( selCh7, 0, wxALL, 5 );
	
	
	bSizer1293->Add( 5, 0, 0, wxEXPAND, 5 );
	
	m_staticText1629 = new wxStaticText( m_panel4, wxID_ANY, wxT("8."), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText1629->Wrap( -1 );
	bSizer1293->Add( m_staticText1629, 0, wxBOTTOM|wxTOP, 5 );
	
	selCh8 = new wxCheckBox( m_panel4, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	
	bSizer1293->Add( selCh8, 0, wxALL, 5 );
	
	bSizer1283->Add( bSizer1293, 1, 0, 5 );
	
	wxBoxSizer* bSizer12931;
	bSizer12931 = new wxBoxSizer( wxHORIZONTAL );
	
	m_staticText1627 = new wxStaticText( m_panel4, wxID_ANY, wxT("9."), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText1627->Wrap( -1 );
	bSizer12931->Add( m_staticText1627, 0, wxBOTTOM|wxLEFT|wxTOP, 5 );
	
	selCh9 = new wxCheckBox( m_panel4, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	
	bSizer12931->Add( selCh9, 0, wxALL, 5 );
	
	m_staticText16261 = new wxStaticText( m_panel4, wxID_ANY, wxT("10."), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText16261->Wrap( -1 );
	bSizer12931->Add( m_staticText16261, 0, wxBOTTOM|wxTOP, 5 );
	
	selCh10 = new wxCheckBox( m_panel4, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	
	bSizer12931->Add( selCh10, 0, wxALL, 5 );
	
	m_staticText16251 = new wxStaticText( m_panel4, wxID_ANY, wxT("11."), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText16251->Wrap( -1 );
	bSizer12931->Add( m_staticText16251, 0, wxBOTTOM|wxTOP, 5 );
	
	selCh11 = new wxCheckBox( m_panel4, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	
	bSizer12931->Add( selCh11, 0, wxALL, 5 );
	
	m_staticText16241 = new wxStaticText( m_panel4, wxID_ANY, wxT("12."), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText16241->Wrap( -1 );
	bSizer12931->Add( m_staticText16241, 0, wxBOTTOM|wxTOP, 5 );
	
	selCh12 = new wxCheckBox( m_panel4, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	
	bSizer12931->Add( selCh12, 0, wxALL, 5 );
	
	m_staticText16231 = new wxStaticText( m_panel4, wxID_ANY, wxT("13."), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText16231->Wrap( -1 );
	bSizer12931->Add( m_staticText16231, 0, wxBOTTOM|wxTOP, 5 );
	
	selCh13 = new wxCheckBox( m_panel4, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	
	bSizer12931->Add( selCh13, 0, wxALL, 5 );
	
	m_staticText16221 = new wxStaticText( m_panel4, wxID_ANY, wxT("14."), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText16221->Wrap( -1 );
	bSizer12931->Add( m_staticText16221, 0, wxBOTTOM|wxTOP, 5 );
	
	selCh14 = new wxCheckBox( m_panel4, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	
	bSizer12931->Add( selCh14, 0, wxALL, 5 );
	
	m_staticText16211 = new wxStaticText( m_panel4, wxID_ANY, wxT("15."), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText16211->Wrap( -1 );
	bSizer12931->Add( m_staticText16211, 0, wxBOTTOM|wxTOP, 5 );
	
	selCh15 = new wxCheckBox( m_panel4, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	
	bSizer12931->Add( selCh15, 0, wxALL, 5 );
	
	m_staticText16291 = new wxStaticText( m_panel4, wxID_ANY, wxT("16."), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText16291->Wrap( -1 );
	bSizer12931->Add( m_staticText16291, 0, wxBOTTOM|wxTOP, 5 );
	
	selCh16 = new wxCheckBox( m_panel4, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
	
	bSizer12931->Add( selCh16, 0, wxALL, 5 );
	
	bSizer1283->Add( bSizer12931, 1, wxALIGN_CENTER, 5 );
	
	bSizer46->Add( bSizer1283, 0, wxALIGN_BOTTOM|wxALIGN_CENTER, 5 );
	
	ApplyButton = new wxButton( m_panel4, wxID_APPLYCH, wxT("Apply"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer46->Add( ApplyButton, 0, wxALIGN_RIGHT, 5 );
	
	m_staticline8 = new wxStaticLine( m_panel4, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
	bSizer46->Add( m_staticline8, 0, wxEXPAND | wxALL, 5 );
	
	wxBoxSizer* bSizer1301;
	bSizer1301 = new wxBoxSizer( wxVERTICAL );
	
	m_staticText198 = new wxStaticText( m_panel4, wxID_ANY, wxT("Specify channel settings:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText198->Wrap( -1 );
	m_staticText198->SetFont( wxFont( 8, 74, 90, 92, false, wxT("Tahoma") ) );
	
	bSizer1301->Add( m_staticText198, 0, wxALIGN_CENTER|wxALL, 5 );
	
	wxBoxSizer* bSizer144;
	bSizer144 = new wxBoxSizer( wxHORIZONTAL );
	
	wxBoxSizer* bSizer136;
	bSizer136 = new wxBoxSizer( wxHORIZONTAL );
	
	m_staticText199 = new wxStaticText( m_panel4, wxID_ANY, wxT("Channel:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText199->Wrap( -1 );
	bSizer136->Add( m_staticText199, 0, wxALL, 5 );
	
	wxArrayString SpecChChoices;
	SpecCh = new wxChoice( m_panel4, wxID_CHChoice, wxDefaultPosition, wxSize( 36,-1 ), SpecChChoices, 0 );
	SpecCh->SetSelection( -1 );
	bSizer136->Add( SpecCh, 0, 0, 5 );
	
	bSizer144->Add( bSizer136, 1, wxALL, 2 );
	
	wxBoxSizer* bSizer1361;
	bSizer1361 = new wxBoxSizer( wxHORIZONTAL );
	
	m_staticText1991 = new wxStaticText( m_panel4, wxID_ANY, wxT("Bipolar:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText1991->Wrap( -1 );
	bSizer1361->Add( m_staticText1991, 0, wxALL, 5 );
	
	wxArrayString BipChChoices;
	BipCh = new wxChoice( m_panel4, wxID_ANY, wxDefaultPosition, wxSize( 36,-1 ), BipChChoices, 0 );
	BipCh->SetSelection( 0 );
	bSizer1361->Add( BipCh, 0, 0, 5 );
	
	bSizer144->Add( bSizer1361, 1, wxALL, 2 );
	
	bSizer1301->Add( bSizer144, 1, wxALIGN_CENTER, 5 );
	
	wxBoxSizer* bSizer1441;
	bSizer1441 = new wxBoxSizer( wxHORIZONTAL );
	
	wxBoxSizer* bSizer1362;
	bSizer1362 = new wxBoxSizer( wxHORIZONTAL );
	
	m_staticText1992 = new wxStaticText( m_panel4, wxID_ANY, wxT("Gain:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText1992->Wrap( -1 );
	bSizer1362->Add( m_staticText1992, 0, wxALL, 5 );
	
	
	bSizer1362->Add( 10, 0, 0, wxEXPAND, 5 );
	
	m_gain = new wxTextCtrl( m_panel4, wxID_ANY, wxT("1"), wxDefaultPosition, wxSize( 36,-1 ), 0 );
	bSizer1362->Add( m_gain, 0, wxBOTTOM|wxLEFT, 5 );
	
	bSizer1441->Add( bSizer1362, 1, wxALL, 2 );
	
	wxBoxSizer* bSizer13621;
	bSizer13621 = new wxBoxSizer( wxHORIZONTAL );
	
	m_staticText19921 = new wxStaticText( m_panel4, wxID_ANY, wxT("Offset:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText19921->Wrap( -1 );
	bSizer13621->Add( m_staticText19921, 0, wxALL, 5 );
	
	
	bSizer13621->Add( 0, 0, 0, wxEXPAND, 5 );
	
	m_offset = new wxTextCtrl( m_panel4, wxID_ANY, wxT("0"), wxDefaultPosition, wxSize( 36,-1 ), 0 );
	bSizer13621->Add( m_offset, 0, wxBOTTOM|wxLEFT, 5 );
	
	bSizer1441->Add( bSizer13621, 1, wxEXPAND, 5 );
	
	bSizer1301->Add( bSizer1441, 1, wxALIGN_CENTER, 5 );
	
	wxBoxSizer* bSizer12821;
	bSizer12821 = new wxBoxSizer( wxHORIZONTAL );
	
	m_staticText17221 = new wxStaticText( m_panel4, wxID_ANY, wxT("Band-pass filter:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText17221->Wrap( -1 );
	m_staticText17221->SetFont( wxFont( 8, 74, 90, 90, false, wxT("Tahoma") ) );
	
	bSizer12821->Add( m_staticText17221, 0, wxALL, 5 );
	
	wxArrayString mFilter1Choices;
	mFilter1 = new wxChoice( m_panel4, wxID_FREQ, wxDefaultPosition, wxSize( 135,-1 ), mFilter1Choices, 0 );
	mFilter1->SetSelection( 0 );
	bSizer12821->Add( mFilter1, 0, 0, 5 );
	
	bSizer1301->Add( bSizer12821, 1, wxALIGN_CENTER, 5 );
	
	wxBoxSizer* bSizer1284;
	bSizer1284 = new wxBoxSizer( wxHORIZONTAL );
	
	m_staticText1724 = new wxStaticText( m_panel4, wxID_ANY, wxT("Notch filter:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText1724->Wrap( -1 );
	m_staticText1724->SetFont( wxFont( 8, 74, 90, 90, false, wxT("Tahoma") ) );
	
	bSizer1284->Add( m_staticText1724, 0, wxALL, 5 );
	
	
	bSizer1284->Add( 21, 0, 0, wxEXPAND, 5 );
	
	wxArrayString mnFilter1Choices;
	mnFilter1 = new wxChoice( m_panel4, wxID_FREQ, wxDefaultPosition, wxSize( 135,-1 ), mnFilter1Choices, 0 );
	mnFilter1->SetSelection( 0 );
	bSizer1284->Add( mnFilter1, 0, 0, 5 );
	
	bSizer1301->Add( bSizer1284, 0, wxALIGN_CENTER, 5 );
	
	m_button20 = new wxButton( m_panel4, wxID_APPLYSPEC, wxT("Apply"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer1301->Add( m_button20, 0, wxALIGN_RIGHT, 5 );
	
	m_staticline81 = new wxStaticLine( m_panel4, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
	bSizer1301->Add( m_staticline81, 0, wxEXPAND | wxALL, 5 );
	
	wxBoxSizer* bSizer152;
	bSizer152 = new wxBoxSizer( wxHORIZONTAL );
	
	m_staticText208 = new wxStaticText( m_panel4, wxID_ANY, wxT("Fast Config:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText208->Wrap( -1 );
	bSizer152->Add( m_staticText208, 0, wxALL, 5 );
	
	wxString presetChoices[] = { wxEmptyString, wxT("EEG 8Ch Mono"), wxT("EEG 8Ch bi"), wxT("EEG 16Ch Mono"), wxT("ECG 8Ch Bip") };
	int presetNChoices = sizeof( presetChoices ) / sizeof( wxString );
	preset = new wxChoice( m_panel4, wxID_SET, wxDefaultPosition, wxSize( 100,-1 ), presetNChoices, presetChoices, 0 );
	preset->SetSelection( 0 );
	bSizer152->Add( preset, 0, 0, 5 );
	
	
	bSizer152->Add( 10, 0, 0, wxEXPAND, 5 );
	
	bSizer1301->Add( bSizer152, 1, wxALIGN_CENTER, 5 );
	
	bSizer46->Add( bSizer1301, 1, wxEXPAND, 5 );
	
	fgSizer2->Add( bSizer46, 0, wxEXPAND, 5 );
	
	wxBoxSizer* bSizer246;
	bSizer246 = new wxBoxSizer( wxHORIZONTAL );
	
	Exit = new wxButton( m_panel4, wxID_Exit, wxT("Exit"), wxDefaultPosition, wxDefaultSize, 0 );
	Exit->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
	
	bSizer246->Add( Exit, 0, wxALL, 5 );
	
	Save = new wxButton( m_panel4, wxID_Save, wxT("&OK"), wxDefaultPosition, wxDefaultSize, 0 );
	Save->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
	
	bSizer246->Add( Save, 0, wxALL, 5 );
	
	fgSizer2->Add( bSizer246, 1, wxALIGN_CENTER|wxALIGN_RIGHT|wxALL, 5 );
	
	m_panel4->SetSizer( fgSizer2 );
	m_panel4->Layout();
	fgSizer2->Fit( m_panel4 );
	bSizer66->Add( m_panel4, 1, wxEXPAND | wxALL, 0 );
	
	this->SetSizer( bSizer66 );
	this->Layout();
	bSizer66->Fit( this );
	
	this->Centre( wxBOTH );
	
	// Connect Events
	Gnd1->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( gUsbAmpDialog::Control ), NULL, this );
	Gnd2->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( gUsbAmpDialog::Control ), NULL, this );
	Gnd3->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( gUsbAmpDialog::Control ), NULL, this );
	Gnd4->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( gUsbAmpDialog::Control ), NULL, this );
	Ref1->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( gUsbAmpDialog::Control ), NULL, this );
	Ref2->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( gUsbAmpDialog::Control ), NULL, this );
	Ref3->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( gUsbAmpDialog::Control ), NULL, this );
	Ref4->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( gUsbAmpDialog::Control ), NULL, this );
	Exit->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( gUsbAmpDialog::OnDelete ), NULL, this );
	Save->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( gUsbAmpDialog::OnSaveConfig ), NULL, this );
}

gUsbAmpDialog::~gUsbAmpDialog()
{
	// Disconnect Events
	Gnd1->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( gUsbAmpDialog::Control ), NULL, this );
	Gnd2->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( gUsbAmpDialog::Control ), NULL, this );
	Gnd3->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( gUsbAmpDialog::Control ), NULL, this );
	Gnd4->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( gUsbAmpDialog::Control ), NULL, this );
	Ref1->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( gUsbAmpDialog::Control ), NULL, this );
	Ref2->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( gUsbAmpDialog::Control ), NULL, this );
	Ref3->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( gUsbAmpDialog::Control ), NULL, this );
	Ref4->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( gUsbAmpDialog::Control ), NULL, this );
	Exit->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( gUsbAmpDialog::OnDelete ), NULL, this );
	Save->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( gUsbAmpDialog::OnSaveConfig ), NULL, this );
}

Impedance::Impedance( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxDefaultSize, wxDefaultSize );
	
	wxBoxSizer* bSizer67;
	bSizer67 = new wxBoxSizer( wxVERTICAL );
	
	m_panel5 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
	wxBoxSizer* bSizer265;
	bSizer265 = new wxBoxSizer( wxHORIZONTAL );
	
	wxGridBagSizer* gbSizer1;
	gbSizer1 = new wxGridBagSizer( 0, 0 );
	gbSizer1->SetFlexibleDirection( wxBOTH );
	gbSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
	
	m_staticText216 = new wxStaticText( m_panel5, wxID_ANY, wxT("Impedance values"), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE );
	m_staticText216->Wrap( -1 );
	m_staticText216->SetFont( wxFont( 15, 70, 90, 92, false, wxEmptyString ) );
	
	gbSizer1->Add( m_staticText216, wxGBPosition( 0, 0 ), wxGBSpan( 1, 2 ), wxALL|wxEXPAND, 5 );
	
	wxBoxSizer* bSizer160;
	bSizer160 = new wxBoxSizer( wxHORIZONTAL );
	
	NameCh1 = new wxStaticText( m_panel5, wxID_ANY, wxT("Ch 1"), wxDefaultPosition, wxDefaultSize, 0 );
	NameCh1->Wrap( -1 );
	bSizer160->Add( NameCh1, 1, wxALIGN_CENTER|wxALL, 5 );
	
	ImpCh1 = new wxStaticText( m_panel5, wxID_ANY, wxT("Value"), wxDefaultPosition, wxSize( 70,20 ), wxALIGN_CENTRE|wxDOUBLE_BORDER );
	ImpCh1->Wrap( -1 );
	ImpCh1->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
	ImpCh1->SetBackgroundColour( wxColour( 255, 0, 0 ) );
	ImpCh1->SetMinSize( wxSize( 70,20 ) );
	
	bSizer160->Add( ImpCh1, 0, wxALL|wxEXPAND, 5 );
	
	gbSizer1->Add( bSizer160, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxEXPAND, 5 );
	
	wxBoxSizer* bSizer1601;
	bSizer1601 = new wxBoxSizer( wxHORIZONTAL );
	
	NameCh2 = new wxStaticText( m_panel5, wxID_ANY, wxT("Ch 2"), wxDefaultPosition, wxDefaultSize, 0 );
	NameCh2->Wrap( -1 );
	bSizer1601->Add( NameCh2, 1, wxALIGN_CENTER|wxALL, 5 );
	
	ImpCh2 = new wxStaticText( m_panel5, wxID_ANY, wxT("Value"), wxDefaultPosition, wxSize( 70,20 ), wxALIGN_CENTRE|wxDOUBLE_BORDER );
	ImpCh2->Wrap( -1 );
	ImpCh2->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
	ImpCh2->SetBackgroundColour( wxColour( 255, 0, 0 ) );
	ImpCh2->SetMinSize( wxSize( 70,20 ) );
	
	bSizer1601->Add( ImpCh2, 0, wxALL|wxEXPAND, 5 );
	
	gbSizer1->Add( bSizer1601, wxGBPosition( 1, 1 ), wxGBSpan( 1, 1 ), wxEXPAND, 5 );
	
	wxBoxSizer* bSizer1602;
	bSizer1602 = new wxBoxSizer( wxHORIZONTAL );
	
	NameCh3 = new wxStaticText( m_panel5, wxID_ANY, wxT("Ch 3"), wxDefaultPosition, wxDefaultSize, 0 );
	NameCh3->Wrap( -1 );
	bSizer1602->Add( NameCh3, 1, wxALIGN_CENTER|wxALL, 5 );
	
	ImpCh3 = new wxStaticText( m_panel5, wxID_ANY, wxT("Value"), wxDefaultPosition, wxSize( 70,20 ), wxALIGN_CENTRE|wxDOUBLE_BORDER );
	ImpCh3->Wrap( -1 );
	ImpCh3->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
	ImpCh3->SetBackgroundColour( wxColour( 255, 0, 0 ) );
	ImpCh3->SetMinSize( wxSize( 70,20 ) );
	
	bSizer1602->Add( ImpCh3, 0, wxALL|wxEXPAND, 5 );
	
	gbSizer1->Add( bSizer1602, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxEXPAND, 5 );
	
	wxBoxSizer* bSizer1603;
	bSizer1603 = new wxBoxSizer( wxHORIZONTAL );
	
	NameCh4 = new wxStaticText( m_panel5, wxID_ANY, wxT("Ch 4"), wxDefaultPosition, wxDefaultSize, 0 );
	NameCh4->Wrap( -1 );
	bSizer1603->Add( NameCh4, 1, wxALIGN_CENTER|wxALL, 5 );
	
	ImpCh4 = new wxStaticText( m_panel5, wxID_ANY, wxT("Value"), wxDefaultPosition, wxSize( 70,20 ), wxALIGN_CENTRE|wxDOUBLE_BORDER );
	ImpCh4->Wrap( -1 );
	ImpCh4->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
	ImpCh4->SetBackgroundColour( wxColour( 255, 0, 0 ) );
	ImpCh4->SetMinSize( wxSize( 70,20 ) );
	
	bSizer1603->Add( ImpCh4, 0, wxALL|wxEXPAND, 5 );
	
	gbSizer1->Add( bSizer1603, wxGBPosition( 2, 1 ), wxGBSpan( 1, 1 ), wxEXPAND, 5 );
	
	wxBoxSizer* bSizer1604;
	bSizer1604 = new wxBoxSizer( wxHORIZONTAL );
	
	NameCh5 = new wxStaticText( m_panel5, wxID_ANY, wxT("Ch 5"), wxDefaultPosition, wxDefaultSize, 0 );
	NameCh5->Wrap( -1 );
	bSizer1604->Add( NameCh5, 1, wxALIGN_CENTER|wxALL, 5 );
	
	ImpCh5 = new wxStaticText( m_panel5, wxID_ANY, wxT("Value"), wxDefaultPosition, wxSize( 70,20 ), wxALIGN_CENTRE|wxDOUBLE_BORDER );
	ImpCh5->Wrap( -1 );
	ImpCh5->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
	ImpCh5->SetBackgroundColour( wxColour( 255, 0, 0 ) );
	ImpCh5->SetMinSize( wxSize( 70,20 ) );
	
	bSizer1604->Add( ImpCh5, 0, wxALL|wxEXPAND, 5 );
	
	gbSizer1->Add( bSizer1604, wxGBPosition( 3, 0 ), wxGBSpan( 1, 1 ), wxEXPAND, 5 );
	
	wxBoxSizer* bSizer1605;
	bSizer1605 = new wxBoxSizer( wxHORIZONTAL );
	
	NameCh6 = new wxStaticText( m_panel5, wxID_ANY, wxT("Ch 6"), wxDefaultPosition, wxDefaultSize, 0 );
	NameCh6->Wrap( -1 );
	bSizer1605->Add( NameCh6, 1, wxALIGN_CENTER|wxALL, 5 );
	
	ImpCh6 = new wxStaticText( m_panel5, wxID_ANY, wxT("Value"), wxDefaultPosition, wxSize( 70,20 ), wxALIGN_CENTRE|wxDOUBLE_BORDER );
	ImpCh6->Wrap( -1 );
	ImpCh6->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
	ImpCh6->SetBackgroundColour( wxColour( 255, 0, 0 ) );
	ImpCh6->SetMinSize( wxSize( 70,20 ) );
	
	bSizer1605->Add( ImpCh6, 0, wxALL|wxEXPAND, 5 );
	
	gbSizer1->Add( bSizer1605, wxGBPosition( 3, 1 ), wxGBSpan( 1, 1 ), wxEXPAND, 5 );
	
	wxBoxSizer* bSizer1606;
	bSizer1606 = new wxBoxSizer( wxHORIZONTAL );
	
	NameCh7 = new wxStaticText( m_panel5, wxID_ANY, wxT("Ch 7"), wxDefaultPosition, wxDefaultSize, 0 );
	NameCh7->Wrap( -1 );
	bSizer1606->Add( NameCh7, 1, wxALIGN_CENTER|wxALL, 5 );
	
	ImpCh7 = new wxStaticText( m_panel5, wxID_ANY, wxT("Value"), wxDefaultPosition, wxSize( 70,20 ), wxALIGN_CENTRE|wxDOUBLE_BORDER );
	ImpCh7->Wrap( -1 );
	ImpCh7->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
	ImpCh7->SetBackgroundColour( wxColour( 255, 0, 0 ) );
	ImpCh7->SetMinSize( wxSize( 70,20 ) );
	
	bSizer1606->Add( ImpCh7, 0, wxALL|wxEXPAND, 5 );
	
	gbSizer1->Add( bSizer1606, wxGBPosition( 4, 0 ), wxGBSpan( 1, 1 ), wxEXPAND, 5 );
	
	wxBoxSizer* bSizer1607;
	bSizer1607 = new wxBoxSizer( wxHORIZONTAL );
	
	NameCh8 = new wxStaticText( m_panel5, wxID_ANY, wxT("Ch 8"), wxDefaultPosition, wxDefaultSize, 0 );
	NameCh8->Wrap( -1 );
	bSizer1607->Add( NameCh8, 1, wxALIGN_CENTER|wxALL, 5 );
	
	ImpCh8 = new wxStaticText( m_panel5, wxID_ANY, wxT("Value"), wxDefaultPosition, wxSize( 70,20 ), wxALIGN_CENTRE|wxDOUBLE_BORDER );
	ImpCh8->Wrap( -1 );
	ImpCh8->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
	ImpCh8->SetBackgroundColour( wxColour( 255, 0, 0 ) );
	ImpCh8->SetMinSize( wxSize( 70,20 ) );
	
	bSizer1607->Add( ImpCh8, 0, wxALL|wxEXPAND, 5 );
	
	gbSizer1->Add( bSizer1607, wxGBPosition( 4, 1 ), wxGBSpan( 1, 1 ), wxEXPAND, 5 );
	
	wxBoxSizer* bSizer1608;
	bSizer1608 = new wxBoxSizer( wxHORIZONTAL );
	
	NameCh9 = new wxStaticText( m_panel5, wxID_ANY, wxT("Ch 9"), wxDefaultPosition, wxDefaultSize, 0 );
	NameCh9->Wrap( -1 );
	bSizer1608->Add( NameCh9, 1, wxALIGN_CENTER|wxALL, 5 );
	
	ImpCh9 = new wxStaticText( m_panel5, wxID_ANY, wxT("Value"), wxDefaultPosition, wxSize( 70,20 ), wxALIGN_CENTRE|wxDOUBLE_BORDER );
	ImpCh9->Wrap( -1 );
	ImpCh9->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
	ImpCh9->SetBackgroundColour( wxColour( 255, 0, 0 ) );
	ImpCh9->SetMinSize( wxSize( 70,20 ) );
	
	bSizer1608->Add( ImpCh9, 0, wxALL|wxEXPAND, 5 );
	
	gbSizer1->Add( bSizer1608, wxGBPosition( 5, 0 ), wxGBSpan( 1, 1 ), wxEXPAND, 5 );
	
	wxBoxSizer* bSizer1609;
	bSizer1609 = new wxBoxSizer( wxHORIZONTAL );
	
	NameCh10 = new wxStaticText( m_panel5, wxID_ANY, wxT("Ch 10"), wxDefaultPosition, wxDefaultSize, 0 );
	NameCh10->Wrap( -1 );
	bSizer1609->Add( NameCh10, 1, wxALIGN_CENTER|wxALL, 5 );
	
	ImpCh10 = new wxStaticText( m_panel5, wxID_ANY, wxT("Value"), wxDefaultPosition, wxSize( 70,20 ), wxALIGN_CENTRE|wxDOUBLE_BORDER );
	ImpCh10->Wrap( -1 );
	ImpCh10->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
	ImpCh10->SetBackgroundColour( wxColour( 255, 0, 0 ) );
	ImpCh10->SetMinSize( wxSize( 70,20 ) );
	
	bSizer1609->Add( ImpCh10, 0, wxALL|wxEXPAND, 5 );
	
	gbSizer1->Add( bSizer1609, wxGBPosition( 5, 1 ), wxGBSpan( 1, 1 ), wxEXPAND, 5 );
	
	wxBoxSizer* bSizer16010;
	bSizer16010 = new wxBoxSizer( wxHORIZONTAL );
	
	NameCh11 = new wxStaticText( m_panel5, wxID_ANY, wxT("Ch 11"), wxDefaultPosition, wxDefaultSize, 0 );
	NameCh11->Wrap( -1 );
	bSizer16010->Add( NameCh11, 1, wxALIGN_CENTER|wxALL, 5 );
	
	ImpCh11 = new wxStaticText( m_panel5, wxID_ANY, wxT("Value"), wxDefaultPosition, wxSize( 70,20 ), wxALIGN_CENTRE|wxDOUBLE_BORDER );
	ImpCh11->Wrap( -1 );
	ImpCh11->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
	ImpCh11->SetBackgroundColour( wxColour( 255, 0, 0 ) );
	ImpCh11->SetMinSize( wxSize( 70,20 ) );
	
	bSizer16010->Add( ImpCh11, 0, wxALL|wxEXPAND, 5 );
	
	gbSizer1->Add( bSizer16010, wxGBPosition( 6, 0 ), wxGBSpan( 1, 1 ), wxEXPAND, 5 );
	
	wxBoxSizer* bSizer16011;
	bSizer16011 = new wxBoxSizer( wxHORIZONTAL );
	
	NameCh12 = new wxStaticText( m_panel5, wxID_ANY, wxT("Ch 12"), wxDefaultPosition, wxDefaultSize, 0 );
	NameCh12->Wrap( -1 );
	bSizer16011->Add( NameCh12, 1, wxALIGN_CENTER|wxALL, 5 );
	
	ImpCh12 = new wxStaticText( m_panel5, wxID_ANY, wxT("Value"), wxDefaultPosition, wxSize( 70,20 ), wxALIGN_CENTRE|wxDOUBLE_BORDER );
	ImpCh12->Wrap( -1 );
	ImpCh12->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
	ImpCh12->SetBackgroundColour( wxColour( 255, 0, 0 ) );
	ImpCh12->SetMinSize( wxSize( 70,20 ) );
	
	bSizer16011->Add( ImpCh12, 0, wxALL|wxEXPAND, 5 );
	
	gbSizer1->Add( bSizer16011, wxGBPosition( 6, 1 ), wxGBSpan( 1, 1 ), wxEXPAND, 5 );
	
	wxBoxSizer* bSizer16012;
	bSizer16012 = new wxBoxSizer( wxHORIZONTAL );
	
	NameCh13 = new wxStaticText( m_panel5, wxID_ANY, wxT("Ch 13"), wxDefaultPosition, wxDefaultSize, 0 );
	NameCh13->Wrap( -1 );
	bSizer16012->Add( NameCh13, 1, wxALIGN_CENTER|wxALL, 5 );
	
	ImpCh13 = new wxStaticText( m_panel5, wxID_ANY, wxT("Value"), wxDefaultPosition, wxSize( 70,20 ), wxALIGN_CENTRE|wxDOUBLE_BORDER );
	ImpCh13->Wrap( -1 );
	ImpCh13->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
	ImpCh13->SetBackgroundColour( wxColour( 255, 0, 0 ) );
	ImpCh13->SetMinSize( wxSize( 70,20 ) );
	
	bSizer16012->Add( ImpCh13, 0, wxALL|wxEXPAND, 5 );
	
	gbSizer1->Add( bSizer16012, wxGBPosition( 7, 0 ), wxGBSpan( 1, 1 ), wxEXPAND, 5 );
	
	wxBoxSizer* bSizer16013;
	bSizer16013 = new wxBoxSizer( wxHORIZONTAL );
	
	NameCh14 = new wxStaticText( m_panel5, wxID_ANY, wxT("Ch 14"), wxDefaultPosition, wxDefaultSize, 0 );
	NameCh14->Wrap( -1 );
	bSizer16013->Add( NameCh14, 1, wxALIGN_CENTER|wxALL, 5 );
	
	ImpCh14 = new wxStaticText( m_panel5, wxID_ANY, wxT("Value"), wxDefaultPosition, wxSize( 70,20 ), wxALIGN_CENTRE|wxDOUBLE_BORDER );
	ImpCh14->Wrap( -1 );
	ImpCh14->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
	ImpCh14->SetBackgroundColour( wxColour( 255, 0, 0 ) );
	ImpCh14->SetMinSize( wxSize( 70,20 ) );
	
	bSizer16013->Add( ImpCh14, 0, wxALL|wxEXPAND, 5 );
	
	gbSizer1->Add( bSizer16013, wxGBPosition( 7, 1 ), wxGBSpan( 1, 1 ), wxEXPAND, 5 );
	
	wxBoxSizer* bSizer16014;
	bSizer16014 = new wxBoxSizer( wxHORIZONTAL );
	
	NameCh15 = new wxStaticText( m_panel5, wxID_ANY, wxT("Ch 15"), wxDefaultPosition, wxDefaultSize, 0 );
	NameCh15->Wrap( -1 );
	bSizer16014->Add( NameCh15, 1, wxALIGN_CENTER|wxALL, 5 );
	
	ImpCh15 = new wxStaticText( m_panel5, wxID_ANY, wxT("Value"), wxDefaultPosition, wxSize( 70,20 ), wxALIGN_CENTRE|wxDOUBLE_BORDER );
	ImpCh15->Wrap( -1 );
	ImpCh15->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
	ImpCh15->SetBackgroundColour( wxColour( 255, 0, 0 ) );
	ImpCh15->SetMinSize( wxSize( 70,20 ) );
	
	bSizer16014->Add( ImpCh15, 0, wxALL|wxEXPAND, 5 );
	
	gbSizer1->Add( bSizer16014, wxGBPosition( 8, 0 ), wxGBSpan( 1, 1 ), wxEXPAND, 5 );
	
	wxBoxSizer* bSizer16015;
	bSizer16015 = new wxBoxSizer( wxHORIZONTAL );
	
	NameCh16 = new wxStaticText( m_panel5, wxID_ANY, wxT("Ch 16"), wxDefaultPosition, wxDefaultSize, 0 );
	NameCh16->Wrap( -1 );
	bSizer16015->Add( NameCh16, 1, wxALIGN_CENTER|wxALL, 5 );
	
	ImpCh16 = new wxStaticText( m_panel5, wxID_ANY, wxT("Value"), wxDefaultPosition, wxSize( 70,20 ), wxALIGN_CENTRE|wxDOUBLE_BORDER );
	ImpCh16->Wrap( -1 );
	ImpCh16->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
	ImpCh16->SetBackgroundColour( wxColour( 255, 0, 0 ) );
	ImpCh16->SetMinSize( wxSize( 70,20 ) );
	
	bSizer16015->Add( ImpCh16, 0, wxALL|wxEXPAND, 5 );
	
	gbSizer1->Add( bSizer16015, wxGBPosition( 8, 1 ), wxGBSpan( 1, 1 ), wxEXPAND, 5 );
	
	wxBoxSizer* bSizer16016;
	bSizer16016 = new wxBoxSizer( wxHORIZONTAL );
	
	NameRef1 = new wxStaticText( m_panel5, wxID_ANY, wxT("Ref 1"), wxDefaultPosition, wxDefaultSize, 0 );
	NameRef1->Wrap( -1 );
	bSizer16016->Add( NameRef1, 1, wxALIGN_CENTER|wxALL, 5 );
	
	ImpRef1 = new wxStaticText( m_panel5, wxID_ANY, wxT("Value"), wxDefaultPosition, wxSize( 70,20 ), wxALIGN_CENTRE|wxDOUBLE_BORDER );
	ImpRef1->Wrap( -1 );
	ImpRef1->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
	ImpRef1->SetBackgroundColour( wxColour( 255, 0, 0 ) );
	ImpRef1->SetMinSize( wxSize( 70,20 ) );
	
	bSizer16016->Add( ImpRef1, 0, wxALL|wxEXPAND, 5 );
	
	gbSizer1->Add( bSizer16016, wxGBPosition( 9, 0 ), wxGBSpan( 1, 1 ), wxEXPAND, 5 );
	
	wxBoxSizer* bSizer160161;
	bSizer160161 = new wxBoxSizer( wxHORIZONTAL );
	
	NameRef2 = new wxStaticText( m_panel5, wxID_ANY, wxT("Ref 2"), wxDefaultPosition, wxDefaultSize, 0 );
	NameRef2->Wrap( -1 );
	bSizer160161->Add( NameRef2, 1, wxALIGN_CENTER|wxALL, 5 );
	
	ImpRef2 = new wxStaticText( m_panel5, wxID_ANY, wxT("Value"), wxDefaultPosition, wxSize( 70,20 ), wxALIGN_CENTRE|wxDOUBLE_BORDER );
	ImpRef2->Wrap( -1 );
	ImpRef2->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
	ImpRef2->SetBackgroundColour( wxColour( 255, 0, 0 ) );
	ImpRef2->SetMinSize( wxSize( 70,20 ) );
	
	bSizer160161->Add( ImpRef2, 0, wxALL|wxEXPAND, 5 );
	
	gbSizer1->Add( bSizer160161, wxGBPosition( 9, 1 ), wxGBSpan( 1, 1 ), wxEXPAND, 5 );
	
	wxBoxSizer* bSizer1601611;
	bSizer1601611 = new wxBoxSizer( wxHORIZONTAL );
	
	NameRef3 = new wxStaticText( m_panel5, wxID_ANY, wxT("Ref 3"), wxDefaultPosition, wxDefaultSize, 0 );
	NameRef3->Wrap( -1 );
	bSizer1601611->Add( NameRef3, 1, wxALIGN_CENTER|wxALL, 5 );
	
	ImpRef3 = new wxStaticText( m_panel5, wxID_ANY, wxT("Value"), wxDefaultPosition, wxSize( 70,20 ), wxALIGN_CENTRE|wxDOUBLE_BORDER );
	ImpRef3->Wrap( -1 );
	ImpRef3->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
	ImpRef3->SetBackgroundColour( wxColour( 255, 0, 0 ) );
	ImpRef3->SetMinSize( wxSize( 70,20 ) );
	
	bSizer1601611->Add( ImpRef3, 0, wxALL|wxEXPAND, 5 );
	
	gbSizer1->Add( bSizer1601611, wxGBPosition( 10, 0 ), wxGBSpan( 1, 1 ), wxEXPAND, 5 );
	
	wxBoxSizer* bSizer1601612;
	bSizer1601612 = new wxBoxSizer( wxHORIZONTAL );
	
	NameRef4 = new wxStaticText( m_panel5, wxID_ANY, wxT("Ref 4"), wxDefaultPosition, wxDefaultSize, 0 );
	NameRef4->Wrap( -1 );
	bSizer1601612->Add( NameRef4, 1, wxALIGN_CENTER|wxALL, 5 );
	
	ImpRef4 = new wxStaticText( m_panel5, wxID_ANY, wxT("Value"), wxDefaultPosition, wxSize( 70,20 ), wxALIGN_CENTRE|wxDOUBLE_BORDER );
	ImpRef4->Wrap( -1 );
	ImpRef4->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
	ImpRef4->SetBackgroundColour( wxColour( 255, 0, 0 ) );
	ImpRef4->SetMinSize( wxSize( 70,20 ) );
	
	bSizer1601612->Add( ImpRef4, 0, wxALL|wxEXPAND, 5 );
	
	gbSizer1->Add( bSizer1601612, wxGBPosition( 10, 1 ), wxGBSpan( 1, 1 ), wxEXPAND, 5 );
	
	bSizer265->Add( gbSizer1, 1, wxEXPAND, 5 );
	
	m_panel5->SetSizer( bSizer265 );
	m_panel5->Layout();
	bSizer265->Fit( m_panel5 );
	bSizer67->Add( m_panel5, 1, wxALL, 0 );
	
	this->SetSizer( bSizer67 );
	this->Layout();
	bSizer67->Fit( this );
}

Impedance::~Impedance()
{
}

APDialog::APDialog( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxDefaultSize, wxDefaultSize );
	
	wxGridSizer* gSizer6;
	gSizer6 = new wxGridSizer( 2, 2, 0, 0 );
	
	wxStaticBoxSizer* sbSizer10;
	sbSizer10 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxT("Param 1") ), wxHORIZONTAL );
	
	
	sbSizer10->Add( 0, 0, 1, wxEXPAND, 5 );
	
	m_staticText8 = new wxStaticText( this, wxID_ANY, wxT("MyLabel"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText8->Wrap( -1 );
	sbSizer10->Add( m_staticText8, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
	
	m_staticText13 = new wxStaticText( this, wxID_ANY, wxT("Hz"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText13->Wrap( -1 );
	sbSizer10->Add( m_staticText13, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
	
	
	sbSizer10->Add( 0, 0, 1, wxEXPAND, 5 );
	
	gSizer6->Add( sbSizer10, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
	
	wxStaticBoxSizer* sbSizer12;
	sbSizer12 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxT("Param 2") ), wxHORIZONTAL );
	
	
	sbSizer12->Add( 0, 0, 1, wxEXPAND, 5 );
	
	m_staticText10 = new wxStaticText( this, wxID_ANY, wxT("MyLabel"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText10->Wrap( -1 );
	sbSizer12->Add( m_staticText10, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
	
	m_staticText14 = new wxStaticText( this, wxID_ANY, wxT("Bpm"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText14->Wrap( -1 );
	sbSizer12->Add( m_staticText14, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
	
	
	sbSizer12->Add( 0, 0, 1, wxEXPAND, 5 );
	
	gSizer6->Add( sbSizer12, 1, wxEXPAND, 5 );
	
	wxStaticBoxSizer* sbSizer13;
	sbSizer13 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxT("Param 3") ), wxHORIZONTAL );
	
	
	sbSizer13->Add( 0, 0, 1, wxEXPAND, 5 );
	
	m_staticText11 = new wxStaticText( this, wxID_ANY, wxT("MyLabel"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText11->Wrap( -1 );
	sbSizer13->Add( m_staticText11, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
	
	m_staticText15 = new wxStaticText( this, wxID_ANY, wxT("m3/s"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText15->Wrap( -1 );
	sbSizer13->Add( m_staticText15, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
	
	
	sbSizer13->Add( 0, 0, 1, wxEXPAND, 5 );
	
	gSizer6->Add( sbSizer13, 1, wxEXPAND, 5 );
	
	wxStaticBoxSizer* sbSizer14;
	sbSizer14 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxT("Param 4") ), wxHORIZONTAL );
	
	
	sbSizer14->Add( 0, 0, 1, wxEXPAND, 5 );
	
	m_staticText12 = new wxStaticText( this, wxID_ANY, wxT("MyLabel"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText12->Wrap( -1 );
	sbSizer14->Add( m_staticText12, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
	
	m_staticText16 = new wxStaticText( this, wxID_ANY, wxT("Kbits"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText16->Wrap( -1 );
	sbSizer14->Add( m_staticText16, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
	
	
	sbSizer14->Add( 0, 0, 1, wxEXPAND, 5 );
	
	gSizer6->Add( sbSizer14, 1, wxEXPAND, 5 );
	
	m_F1 = new wxButton( this, wxID_ANY, wxT("F1"), wxDefaultPosition, wxDefaultSize, 0 );
	gSizer6->Add( m_F1, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
	
	m_F2 = new wxButton( this, wxID_ANY, wxT("F2"), wxDefaultPosition, wxDefaultSize, 0 );
	gSizer6->Add( m_F2, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
	
	m_button7 = new wxButton( this, wxID_ANY, wxT("F3"), wxDefaultPosition, wxDefaultSize, 0 );
	gSizer6->Add( m_button7, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
	
	m_F4 = new wxButton( this, wxID_ANY, wxT("F4"), wxDefaultPosition, wxDefaultSize, 0 );
	gSizer6->Add( m_F4, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
	
	this->SetSizer( gSizer6 );
	this->Layout();
}

APDialog::~APDialog()
{
}

WaitDialog::WaitDialog( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxDefaultSize, wxDefaultSize );
	
	wxFlexGridSizer* fgSizer3;
	fgSizer3 = new wxFlexGridSizer( 1, 3, 0, 0 );
	fgSizer3->SetFlexibleDirection( wxBOTH );
	fgSizer3->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
	
	m_bitmap4 = new wxStaticBitmap( this, wxID_ANY, wxBitmap( wxT("Media/wait.bmp"), wxBITMAP_TYPE_ANY ), wxDefaultPosition, wxDefaultSize, 0 );
	fgSizer3->Add( m_bitmap4, 0, wxALL, 5 );
	
	m_staticText75 = new wxStaticText( this, wxID_ANY, wxT("Waiting for BrainVision Recorder Monitoring Startup"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText75->Wrap( -1 );
	fgSizer3->Add( m_staticText75, 0, wxALIGN_CENTER|wxALL, 5 );
	
	this->SetSizer( fgSizer3 );
	this->Layout();
	fgSizer3->Fit( this );
	
	this->Centre( wxBOTH );
	
	// Connect Events
	this->Connect( wxEVT_SIZE, wxSizeEventHandler( WaitDialog::CheckConn ) );
}

WaitDialog::~WaitDialog()
{
	// Disconnect Events
	this->Disconnect( wxEVT_SIZE, wxSizeEventHandler( WaitDialog::CheckConn ) );
}

PleaseWait::PleaseWait( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxDefaultSize, wxDefaultSize );
	
	
	this->Centre( wxBOTH );
	
	// Connect Events
	this->Connect( wxEVT_SIZE, wxSizeEventHandler( PleaseWait::CheckConn ) );
}

PleaseWait::~PleaseWait()
{
	// Disconnect Events
	this->Disconnect( wxEVT_SIZE, wxSizeEventHandler( PleaseWait::CheckConn ) );
}

ResegUP_Dialog::ResegUP_Dialog( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxDefaultSize, wxDefaultSize );
	
	wxFlexGridSizer* fgSizer3;
	fgSizer3 = new wxFlexGridSizer( 1, 1, 0, 0 );
	fgSizer3->SetFlexibleDirection( wxBOTH );
	fgSizer3->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
	
	wxGridBagSizer* gbSizer2;
	gbSizer2 = new wxGridBagSizer( 0, 0 );
	gbSizer2->SetFlexibleDirection( wxBOTH );
	gbSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
	
	m_bitmap4 = new wxStaticBitmap( this, wxID_ANY, wxBitmap( wxT("Media/resegup.bmp"), wxBITMAP_TYPE_ANY ), wxDefaultPosition, wxDefaultSize, wxDOUBLE_BORDER );
	gbSizer2->Add( m_bitmap4, wxGBPosition( 0, 0 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER|wxALL, 5 );
	
	m_staticText841 = new wxStaticText( this, wxID_ANY, wxT("Select Runner:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText841->Wrap( -1 );
	m_staticText841->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Tahoma") ) );
	
	gbSizer2->Add( m_staticText841, wxGBPosition( 1, 0 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER|wxALL, 5 );
	
	m_staticText79 = new wxStaticText( this, wxID_ANY, wxT("ID Runner"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText79->Wrap( -1 );
	gbSizer2->Add( m_staticText79, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER|wxALL, 5 );
	
	wxArrayString wxID_RunnerChoices;
	wxID_Runner = new wxChoice( this, wxID_CHOICE, wxDefaultPosition, wxDefaultSize, wxID_RunnerChoices, 0 );
	wxID_Runner->SetSelection( 0 );
	gbSizer2->Add( wxID_Runner, wxGBPosition( 2, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER|wxALL, 5 );
	
	fgSizer3->Add( gbSizer2, 1, wxALL|wxEXPAND, 5 );
	
	this->SetSizer( fgSizer3 );
	this->Layout();
	fgSizer3->Fit( this );
	
	this->Centre( wxBOTH );
	
	// Connect Events
	this->Connect( wxEVT_SIZE, wxSizeEventHandler( ResegUP_Dialog::CheckConn ) );
}

ResegUP_Dialog::~ResegUP_Dialog()
{
	// Disconnect Events
	this->Disconnect( wxEVT_SIZE, wxSizeEventHandler( ResegUP_Dialog::CheckConn ) );
}

AboutDiag::AboutDiag( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxDefaultSize, wxDefaultSize );
	
	bSizer80 = new wxBoxSizer( wxVERTICAL );
	
	gbSizer4 = new wxGridBagSizer( 0, 0 );
	gbSizer4->SetFlexibleDirection( wxBOTH );
	gbSizer4->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
	
	wxBoxSizer* bSizer74;
	bSizer74 = new wxBoxSizer( wxVERTICAL );
	
	m_staticText115 = new wxStaticText( this, wxID_ANY, wxT("BCI ++ 2.0"), wxPoint( 1,2 ), wxDefaultSize, 0 );
	m_staticText115->Wrap( -1 );
	m_staticText115->SetFont( wxFont( 12, 74, 90, 92, false, wxT("Calibri") ) );
	
	bSizer74->Add( m_staticText115, 0, wxALL, 5 );
	
	m_staticText118 = new wxStaticText( this, wxID_ANY, wxT("HIM 8.11 beta\nHardware Interface Monitor\n\nDevelop by eng. Paolo Perego\nGUI Design by Nils Faber\n\nPlease visit our website: \nwww.sensibilab.campuspoint.polimi.it\n"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText118->Wrap( -1 );
	m_staticText118->SetFont( wxFont( 10, 74, 90, 90, false, wxT("Calibri") ) );
	
	bSizer74->Add( m_staticText118, 0, wxALL, 5 );
	
	gbSizer4->Add( bSizer74, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxEXPAND, 5 );
	
	bSizer80->Add( gbSizer4, 1, wxEXPAND, 5 );
	
	this->SetSizer( bSizer80 );
	this->Layout();
	bSizer80->Fit( this );
}

AboutDiag::~AboutDiag()
{
}

PlayFile_Dlg::PlayFile_Dlg( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxDefaultSize, wxDefaultSize );
	
	wxBoxSizer* bSizer112;
	bSizer112 = new wxBoxSizer( wxVERTICAL );
	
	Title = new wxStaticText( this, wxID_ANY, wxT("PlayFile Config"), wxDefaultPosition, wxDefaultSize, 0 );
	Title->Wrap( -1 );
	Title->SetFont( wxFont( 18, 74, 90, 92, false, wxT("Calibri") ) );
	
	bSizer112->Add( Title, 0, wxALIGN_CENTER|wxALL, 5 );
	
	wxBoxSizer* bSizer119;
	bSizer119 = new wxBoxSizer( wxHORIZONTAL );
	
	
	bSizer119->Add( 20, 0, 1, wxEXPAND, 5 );
	
	m_staticText153 = new wxStaticText( this, wxID_ANY, wxT("Device:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText153->Wrap( -1 );
	bSizer119->Add( m_staticText153, 0, wxALIGN_CENTER|wxALL, 5 );
	
	
	bSizer119->Add( 22, 0, 0, wxEXPAND, 5 );
	
	wxString selDevChoices[] = { wxT(" "), wxT("PLE - Polimi"), wxT("Bluesilk - Polimi"), wxT("gMobiLab - gTec"), wxT("gUSBamp - gTec"), wxT("BrainBox - BT") };
	int selDevNChoices = sizeof( selDevChoices ) / sizeof( wxString );
	selDev = new wxChoice( this, wxID_PlayDEV, wxDefaultPosition, wxSize( 80,-1 ), selDevNChoices, selDevChoices, 0 );
	selDev->SetSelection( 0 );
	bSizer119->Add( selDev, 0, wxALL, 5 );
	
	bSizer112->Add( bSizer119, 0, 0, 5 );
	
	m_staticline8 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
	bSizer112->Add( m_staticline8, 0, wxEXPAND | wxALL, 5 );
	
	wxGridSizer* gSizer5;
	gSizer5 = new wxGridSizer( 5, 2, 0, 0 );
	
	LabChannel = new wxStaticText( this, wxID_ANY, wxT("Channel #:"), wxDefaultPosition, wxDefaultSize, 0 );
	LabChannel->Wrap( -1 );
	gSizer5->Add( LabChannel, 0, wxALIGN_CENTER|wxALL, 5 );
	
	NCH = new wxComboBox( this, wxID_ANY, wxT("8"), wxDefaultPosition, wxSize( 80,-1 ), 0, NULL, 0 );
	NCH->Append( wxT("1") );
	NCH->Append( wxT("2") );
	NCH->Append( wxT("3") );
	NCH->Append( wxT("4") );
	NCH->Append( wxT("5") );
	NCH->Append( wxT("6") );
	NCH->Append( wxT("7") );
	NCH->Append( wxT("8") );
	NCH->Append( wxT("9") );
	NCH->Append( wxT("10") );
	NCH->Append( wxT("11") );
	NCH->Append( wxT("12") );
	NCH->Append( wxT("13") );
	NCH->Append( wxT("14") );
	NCH->Append( wxT("15") );
	NCH->Append( wxT("16") );
	gSizer5->Add( NCH, 0, wxALL, 5 );
	
	LabChannel1 = new wxStaticText( this, wxID_ANY, wxT("Sample freq:"), wxDefaultPosition, wxDefaultSize, 0 );
	LabChannel1->Wrap( -1 );
	gSizer5->Add( LabChannel1, 0, wxALIGN_CENTER|wxALL, 5 );
	
	SFreq = new wxComboBox( this, wxID_ANY, wxT("256"), wxDefaultPosition, wxSize( 80,-1 ), 0, NULL, 0 );
	SFreq->Append( wxT("32") );
	SFreq->Append( wxT("64") );
	SFreq->Append( wxT("128") );
	SFreq->Append( wxT("256") );
	SFreq->Append( wxT("512") );
	SFreq->Append( wxT("1024") );
	gSizer5->Add( SFreq, 0, wxALL, 5 );
	
	LabChannel11 = new wxStaticText( this, wxID_ANY, wxT("Resolution:"), wxDefaultPosition, wxDefaultSize, 0 );
	LabChannel11->Wrap( -1 );
	gSizer5->Add( LabChannel11, 0, wxALIGN_CENTER|wxALL, 5 );
	
	Res = new wxComboBox( this, wxID_ANY, wxT("1"), wxDefaultPosition, wxSize( 80,-1 ), 0, NULL, 0 );
	Res->Append( wxT("1") );
	Res->Append( wxT("0.8") );
	Res->Append( wxT("0.0298") );
	Res->Append( wxT("0.0076") );
	gSizer5->Add( Res, 0, wxALL, 5 );
	
	DigitalMinLb = new wxStaticText( this, wxID_ANY, wxT("Digital Min:"), wxDefaultPosition, wxDefaultSize, 0 );
	DigitalMinLb->Wrap( -1 );
	gSizer5->Add( DigitalMinLb, 0, wxALIGN_CENTER|wxALL, 5 );
	
	DigMin = new wxComboBox( this, wxID_ANY, wxT("0"), wxDefaultPosition, wxSize( 80,-1 ), 0, NULL, 0 );
	DigMin->Append( wxT("0") );
	DigMin->Append( wxT("1024") );
	DigMin->Append( wxT("2048") );
	DigMin->Append( wxT("4096") );
	DigMin->Append( wxT("16384") );
	DigMin->Append( wxT("32768") );
	DigMin->Append( wxT("65536") );
	DigMin->Append( wxT("8388608") );
	DigMin->Append( wxT("-1024") );
	DigMin->Append( wxT("-2048") );
	DigMin->Append( wxT("-4096") );
	DigMin->Append( wxT("-16384") );
	DigMin->Append( wxT("-32768") );
	DigMin->Append( wxT("-65536") );
	DigMin->Append( wxT("-8388608") );
	gSizer5->Add( DigMin, 1, wxALL, 5 );
	
	DigitalMaxLb = new wxStaticText( this, wxID_ANY, wxT("Digital Max:"), wxDefaultPosition, wxDefaultSize, 0 );
	DigitalMaxLb->Wrap( -1 );
	gSizer5->Add( DigitalMaxLb, 0, wxALIGN_CENTER|wxALL, 5 );
	
	DigMax = new wxComboBox( this, wxID_ANY, wxT("4096"), wxDefaultPosition, wxSize( 80,-1 ), 0, NULL, 0 );
	DigMax->Append( wxT("1024") );
	DigMax->Append( wxT("2048") );
	DigMax->Append( wxT("4096") );
	DigMax->Append( wxT("16384") );
	DigMax->Append( wxT("32768") );
	DigMax->Append( wxT("65536") );
	DigMax->Append( wxT("8388608") );
	gSizer5->Add( DigMax, 0, wxALL, 5 );
	
	DigOffsetLb = new wxStaticText( this, wxID_ANY, wxT("Offset:"), wxDefaultPosition, wxDefaultSize, 0 );
	DigOffsetLb->Wrap( -1 );
	gSizer5->Add( DigOffsetLb, 0, wxALIGN_CENTER|wxALL, 5 );
	
	DigOff = new wxComboBox( this, wxID_ANY, wxT("2048"), wxDefaultPosition, wxSize( 80,-1 ), 0, NULL, 0 );
	DigOff->Append( wxT("0") );
	DigOff->Append( wxT("1024") );
	DigOff->Append( wxT("2048") );
	DigOff->Append( wxT("4096") );
	DigOff->Append( wxT("16384") );
	DigOff->Append( wxT("32768") );
	DigOff->Append( wxT("65536") );
	DigOff->Append( wxT("8388608") );
	gSizer5->Add( DigOff, 0, wxALL, 5 );
	
	bSizer112->Add( gSizer5, 1, wxEXPAND, 5 );
	
	Ok = new wxButton( this, wxID_PlayOK, wxT("Ok"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer112->Add( Ok, 0, wxALIGN_CENTER|wxALL, 5 );
	
	this->SetSizer( bSizer112 );
	this->Layout();
	bSizer112->Fit( this );
}

PlayFile_Dlg::~PlayFile_Dlg()
{
}
